def get_path_to_egg(path):
 lastpath = None
 while (path and (path != lastpath)):
  if (os.path.splitext(path)[1].lower() == '.egg'):
   if (os.path.isfile(path) or os.path.isdir(path)):
    return path
  lastpath = path
  path = os.path.dirname(path)
 return None

def get_path_to_egg ( path ) : lastpath = None while ( path and ( path != lastpath ) ) : if ( os . path . splitext ( path ) [ 1 ] . lower ( ) == '.egg' ) : if ( os . path . isfile ( path ) or os . path . isdir ( path ) ) : return path lastpath = path path = os . path . dirname ( path ) return None
return the path to the python egg file .