def modulename(filename):
    """
    Find the modulename from filename.

    filename
      string, name of a python file
    """
    return filename.split('/')[-1].replace('.pyc', '').replace('.py', '')