def get_module_source_path(modname, basename=None):
 srcpath = get_module_path(modname)
 parentdir = osp.join(srcpath, osp.pardir)
 if osp.isfile(parentdir):
  srcpath = osp.abspath(osp.join(osp.join(parentdir, osp.pardir), modname))
 if (basename is not None):
  srcpath = osp.abspath(osp.join(srcpath, basename))
 return srcpath

def get_module_source_path ( modname , basename = None ) : srcpath = get_module_path ( modname ) parentdir = osp . join ( srcpath , osp . pardir ) if osp . isfile ( parentdir ) : srcpath = osp . abspath ( osp . join ( osp . join ( parentdir , osp . pardir ) , modname ) ) if ( basename is not None ) : srcpath = osp . abspath ( osp . join ( srcpath , basename ) ) return srcpath
return module *modname* source path if *basename* is specified .