def extractFileNamefromUrl(url):
    """Extracts a file name from url. 

   :param url: url
   :type url: string
   :returns: file name 
   :rtype: string

   :Example:

   >>> from westpy import * 
   >>> extractFileNamefromUrl("http://www.west-code.org/database/gw100/xyz/CH4.xyz")
   """
    fname = None
    my_url = url[:-1] if url.endswith('/') else url
    if my_url.find('/'):
        fname = my_url.rsplit('/', 1)[1]
    return fname
