def find_package_path(searchfrom):
current = searchfrom + '<STR_LIT:/>'<EOL>init_found = False<EOL>pack_found = False<EOL>while not init_found and current != '<STR_LIT:/>':<EOL><INDENT>current = os.path.dirname(current)<EOL>initfile = os.path.join(current, '<STR_LIT>')<EOL>init_found = os.path.exists(initfile)<EOL><DEDENT>while init_found:<EOL><INDENT>current = os.path.dirname(current)<EOL>initfile = os.path.join(current, '<STR_LIT>')<EOL>init_found = os.path.exists(initfile)<EOL>pack_found = not init_found<EOL><DEDENT>return current if pack_found else None<EOL>
package path. return None if failed to guess