Back
Type Name Operations
__future__.cpython-36.opt-1.pyc
__future__.cpython-36.opt-2.pyc
__future__.cpython-36.pyc
__phello__.foo.cpython-36.opt-1.pyc
__phello__.foo.cpython-36.opt-2.pyc
__phello__.foo.cpython-36.pyc
_bootlocale.cpython-36.opt-1.pyc
_bootlocale.cpython-36.opt-2.pyc
_bootlocale.cpython-36.pyc
_collections_abc.cpython-36.opt-1.pyc
_collections_abc.cpython-36.opt-2.pyc
_collections_abc.cpython-36.pyc
_compat_pickle.cpython-36.opt-1.pyc
_compat_pickle.cpython-36.opt-2.pyc
_compat_pickle.cpython-36.pyc
_compression.cpython-36.opt-1.pyc
_compression.cpython-36.opt-2.pyc
_compression.cpython-36.pyc
_dummy_thread.cpython-36.opt-1.pyc
_dummy_thread.cpython-36.opt-2.pyc
_dummy_thread.cpython-36.pyc
_markupbase.cpython-36.opt-1.pyc
_markupbase.cpython-36.opt-2.pyc
_markupbase.cpython-36.pyc
_osx_support.cpython-36.opt-1.pyc
_osx_support.cpython-36.opt-2.pyc
_osx_support.cpython-36.pyc
_pydecimal.cpython-36.opt-1.pyc
_pydecimal.cpython-36.opt-2.pyc
_pydecimal.cpython-36.pyc
_pyio.cpython-36.opt-1.pyc
_pyio.cpython-36.opt-2.pyc
_pyio.cpython-36.pyc
_sitebuiltins.cpython-36.opt-1.pyc
_sitebuiltins.cpython-36.opt-2.pyc
_sitebuiltins.cpython-36.pyc
_strptime.cpython-36.opt-1.pyc
_strptime.cpython-36.opt-2.pyc
_strptime.cpython-36.pyc
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.pyc
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc
_threading_local.cpython-36.opt-1.pyc
_threading_local.cpython-36.opt-2.pyc
_threading_local.cpython-36.pyc
_weakrefset.cpython-36.opt-1.pyc
_weakrefset.cpython-36.opt-2.pyc
_weakrefset.cpython-36.pyc
abc.cpython-36.opt-1.pyc
abc.cpython-36.opt-2.pyc
abc.cpython-36.pyc
aifc.cpython-36.opt-1.pyc
aifc.cpython-36.opt-2.pyc
aifc.cpython-36.pyc
antigravity.cpython-36.opt-1.pyc
antigravity.cpython-36.opt-2.pyc
antigravity.cpython-36.pyc
argparse.cpython-36.opt-1.pyc
argparse.cpython-36.opt-2.pyc
argparse.cpython-36.pyc
ast.cpython-36.opt-1.pyc
ast.cpython-36.opt-2.pyc
ast.cpython-36.pyc
asynchat.cpython-36.opt-1.pyc
asynchat.cpython-36.opt-2.pyc
asynchat.cpython-36.pyc
asyncore.cpython-36.opt-1.pyc
asyncore.cpython-36.opt-2.pyc
asyncore.cpython-36.pyc
base64.cpython-36.opt-1.pyc
base64.cpython-36.opt-2.pyc
base64.cpython-36.pyc
bdb.cpython-36.opt-1.pyc
bdb.cpython-36.opt-2.pyc
bdb.cpython-36.pyc
binhex.cpython-36.opt-1.pyc
binhex.cpython-36.opt-2.pyc
binhex.cpython-36.pyc
bisect.cpython-36.opt-1.pyc
bisect.cpython-36.opt-2.pyc
bisect.cpython-36.pyc
bz2.cpython-36.opt-1.pyc
bz2.cpython-36.opt-2.pyc
bz2.cpython-36.pyc
cProfile.cpython-36.opt-1.pyc
cProfile.cpython-36.opt-2.pyc
cProfile.cpython-36.pyc
calendar.cpython-36.opt-1.pyc
calendar.cpython-36.opt-2.pyc
calendar.cpython-36.pyc
cgi.cpython-36.opt-1.pyc
cgi.cpython-36.opt-2.pyc
cgi.cpython-36.pyc
cgitb.cpython-36.opt-1.pyc
cgitb.cpython-36.opt-2.pyc
cgitb.cpython-36.pyc
chunk.cpython-36.opt-1.pyc
chunk.cpython-36.opt-2.pyc
chunk.cpython-36.pyc
cmd.cpython-36.opt-1.pyc
cmd.cpython-36.opt-2.pyc
cmd.cpython-36.pyc
code.cpython-36.opt-1.pyc
code.cpython-36.opt-2.pyc
code.cpython-36.pyc
codecs.cpython-36.opt-1.pyc
codecs.cpython-36.opt-2.pyc
codecs.cpython-36.pyc
codeop.cpython-36.opt-1.pyc
codeop.cpython-36.opt-2.pyc
codeop.cpython-36.pyc
colorsys.cpython-36.opt-1.pyc
colorsys.cpython-36.opt-2.pyc
colorsys.cpython-36.pyc
compileall.cpython-36.opt-1.pyc
compileall.cpython-36.opt-2.pyc
compileall.cpython-36.pyc
configparser.cpython-36.opt-1.pyc
configparser.cpython-36.opt-2.pyc
configparser.cpython-36.pyc
contextlib.cpython-36.opt-1.pyc
contextlib.cpython-36.opt-2.pyc
contextlib.cpython-36.pyc
copy.cpython-36.opt-1.pyc
copy.cpython-36.opt-2.pyc
copy.cpython-36.pyc
copyreg.cpython-36.opt-1.pyc
copyreg.cpython-36.opt-2.pyc
copyreg.cpython-36.pyc
crypt.cpython-36.opt-1.pyc
crypt.cpython-36.opt-2.pyc
crypt.cpython-36.pyc
csv.cpython-36.opt-1.pyc
csv.cpython-36.opt-2.pyc
csv.cpython-36.pyc
datetime.cpython-36.opt-1.pyc
datetime.cpython-36.opt-2.pyc
datetime.cpython-36.pyc
decimal.cpython-36.opt-1.pyc
decimal.cpython-36.opt-2.pyc
decimal.cpython-36.pyc
difflib.cpython-36.opt-1.pyc
difflib.cpython-36.opt-2.pyc
difflib.cpython-36.pyc
dis.cpython-36.opt-1.pyc
dis.cpython-36.opt-2.pyc
dis.cpython-36.pyc
doctest.cpython-36.opt-1.pyc
doctest.cpython-36.opt-2.pyc
doctest.cpython-36.pyc
dummy_threading.cpython-36.opt-1.pyc
dummy_threading.cpython-36.opt-2.pyc
dummy_threading.cpython-36.pyc
enum.cpython-36.opt-1.pyc
enum.cpython-36.opt-2.pyc
enum.cpython-36.pyc
filecmp.cpython-36.opt-1.pyc
filecmp.cpython-36.opt-2.pyc
filecmp.cpython-36.pyc
fileinput.cpython-36.opt-1.pyc
fileinput.cpython-36.opt-2.pyc
fileinput.cpython-36.pyc
fnmatch.cpython-36.opt-1.pyc
fnmatch.cpython-36.opt-2.pyc
fnmatch.cpython-36.pyc
formatter.cpython-36.opt-1.pyc
formatter.cpython-36.opt-2.pyc
formatter.cpython-36.pyc
fractions.cpython-36.opt-1.pyc
fractions.cpython-36.opt-2.pyc
fractions.cpython-36.pyc
ftplib.cpython-36.opt-1.pyc
ftplib.cpython-36.opt-2.pyc
ftplib.cpython-36.pyc
functools.cpython-36.opt-1.pyc
functools.cpython-36.opt-2.pyc
functools.cpython-36.pyc
genericpath.cpython-36.opt-1.pyc
genericpath.cpython-36.opt-2.pyc
genericpath.cpython-36.pyc
getopt.cpython-36.opt-1.pyc
getopt.cpython-36.opt-2.pyc
getopt.cpython-36.pyc
getpass.cpython-36.opt-1.pyc
getpass.cpython-36.opt-2.pyc
getpass.cpython-36.pyc
gettext.cpython-36.opt-1.pyc
gettext.cpython-36.opt-2.pyc
gettext.cpython-36.pyc
glob.cpython-36.opt-1.pyc
glob.cpython-36.opt-2.pyc
glob.cpython-36.pyc
gzip.cpython-36.opt-1.pyc
gzip.cpython-36.opt-2.pyc
gzip.cpython-36.pyc
hashlib.cpython-36.opt-1.pyc
hashlib.cpython-36.opt-2.pyc
hashlib.cpython-36.pyc
heapq.cpython-36.opt-1.pyc
heapq.cpython-36.opt-2.pyc
heapq.cpython-36.pyc
hmac.cpython-36.opt-1.pyc
hmac.cpython-36.opt-2.pyc
hmac.cpython-36.pyc
imaplib.cpython-36.opt-1.pyc
imaplib.cpython-36.opt-2.pyc
imaplib.cpython-36.pyc
imghdr.cpython-36.opt-1.pyc
imghdr.cpython-36.opt-2.pyc
imghdr.cpython-36.pyc
imp.cpython-36.opt-1.pyc
imp.cpython-36.opt-2.pyc
imp.cpython-36.pyc
inspect.cpython-36.opt-1.pyc
inspect.cpython-36.opt-2.pyc
inspect.cpython-36.pyc
io.cpython-36.opt-1.pyc
io.cpython-36.opt-2.pyc
io.cpython-36.pyc
ipaddress.cpython-36.opt-1.pyc
ipaddress.cpython-36.opt-2.pyc
ipaddress.cpython-36.pyc
keyword.cpython-36.opt-1.pyc
keyword.cpython-36.opt-2.pyc
keyword.cpython-36.pyc
linecache.cpython-36.opt-1.pyc
linecache.cpython-36.opt-2.pyc
linecache.cpython-36.pyc
locale.cpython-36.opt-1.pyc
locale.cpython-36.opt-2.pyc
locale.cpython-36.pyc
lzma.cpython-36.opt-1.pyc
lzma.cpython-36.opt-2.pyc
lzma.cpython-36.pyc
macpath.cpython-36.opt-1.pyc
macpath.cpython-36.opt-2.pyc
macpath.cpython-36.pyc
macurl2path.cpython-36.opt-1.pyc
macurl2path.cpython-36.opt-2.pyc
macurl2path.cpython-36.pyc
mailbox.cpython-36.opt-1.pyc
mailbox.cpython-36.opt-2.pyc
mailbox.cpython-36.pyc
mailcap.cpython-36.opt-1.pyc
mailcap.cpython-36.opt-2.pyc
mailcap.cpython-36.pyc
mimetypes.cpython-36.opt-1.pyc
mimetypes.cpython-36.opt-2.pyc
mimetypes.cpython-36.pyc
modulefinder.cpython-36.opt-1.pyc
modulefinder.cpython-36.opt-2.pyc
modulefinder.cpython-36.pyc
netrc.cpython-36.opt-1.pyc
netrc.cpython-36.opt-2.pyc
netrc.cpython-36.pyc
nntplib.cpython-36.opt-1.pyc
nntplib.cpython-36.opt-2.pyc
nntplib.cpython-36.pyc
ntpath.cpython-36.opt-1.pyc
ntpath.cpython-36.opt-2.pyc
ntpath.cpython-36.pyc
nturl2path.cpython-36.opt-1.pyc
nturl2path.cpython-36.opt-2.pyc
nturl2path.cpython-36.pyc
numbers.cpython-36.opt-1.pyc
numbers.cpython-36.opt-2.pyc
numbers.cpython-36.pyc
opcode.cpython-36.opt-1.pyc
opcode.cpython-36.opt-2.pyc
opcode.cpython-36.pyc
operator.cpython-36.opt-1.pyc
operator.cpython-36.opt-2.pyc
operator.cpython-36.pyc
optparse.cpython-36.opt-1.pyc
optparse.cpython-36.opt-2.pyc
optparse.cpython-36.pyc
os.cpython-36.opt-1.pyc
os.cpython-36.opt-2.pyc
os.cpython-36.pyc
pathlib.cpython-36.opt-1.pyc
pathlib.cpython-36.opt-2.pyc
pathlib.cpython-36.pyc
pdb.cpython-36.opt-1.pyc
pdb.cpython-36.opt-2.pyc
pdb.cpython-36.pyc
pickle.cpython-36.opt-1.pyc
pickle.cpython-36.opt-2.pyc
pickle.cpython-36.pyc
pickletools.cpython-36.opt-1.pyc
pickletools.cpython-36.opt-2.pyc
pickletools.cpython-36.pyc
pipes.cpython-36.opt-1.pyc
pipes.cpython-36.opt-2.pyc
pipes.cpython-36.pyc
pkgutil.cpython-36.opt-1.pyc
pkgutil.cpython-36.opt-2.pyc
pkgutil.cpython-36.pyc
platform.cpython-36.opt-1.pyc
platform.cpython-36.opt-2.pyc
platform.cpython-36.pyc
plistlib.cpython-36.opt-1.pyc
plistlib.cpython-36.opt-2.pyc
plistlib.cpython-36.pyc
poplib.cpython-36.opt-1.pyc
poplib.cpython-36.opt-2.pyc
poplib.cpython-36.pyc
posixpath.cpython-36.opt-1.pyc
posixpath.cpython-36.opt-2.pyc
posixpath.cpython-36.pyc
pprint.cpython-36.opt-1.pyc
pprint.cpython-36.opt-2.pyc
pprint.cpython-36.pyc
profile.cpython-36.opt-1.pyc
profile.cpython-36.opt-2.pyc
profile.cpython-36.pyc
pstats.cpython-36.opt-1.pyc
pstats.cpython-36.opt-2.pyc
pstats.cpython-36.pyc
pty.cpython-36.opt-1.pyc
pty.cpython-36.opt-2.pyc
pty.cpython-36.pyc
py_compile.cpython-36.opt-1.pyc
py_compile.cpython-36.opt-2.pyc
py_compile.cpython-36.pyc
pyclbr.cpython-36.opt-1.pyc
pyclbr.cpython-36.opt-2.pyc
pyclbr.cpython-36.pyc
pydoc.cpython-36.opt-1.pyc
pydoc.cpython-36.opt-2.pyc
pydoc.cpython-36.pyc
queue.cpython-36.opt-1.pyc
queue.cpython-36.opt-2.pyc
queue.cpython-36.pyc
quopri.cpython-36.opt-1.pyc
quopri.cpython-36.opt-2.pyc
quopri.cpython-36.pyc
random.cpython-36.opt-1.pyc
random.cpython-36.opt-2.pyc
random.cpython-36.pyc
re.cpython-36.opt-1.pyc
re.cpython-36.opt-2.pyc
re.cpython-36.pyc
reprlib.cpython-36.opt-1.pyc
reprlib.cpython-36.opt-2.pyc
reprlib.cpython-36.pyc
rlcompleter.cpython-36.opt-1.pyc
rlcompleter.cpython-36.opt-2.pyc
rlcompleter.cpython-36.pyc
runpy.cpython-36.opt-1.pyc
runpy.cpython-36.opt-2.pyc
runpy.cpython-36.pyc
sched.cpython-36.opt-1.pyc
sched.cpython-36.opt-2.pyc
sched.cpython-36.pyc
secrets.cpython-36.opt-1.pyc
secrets.cpython-36.opt-2.pyc
secrets.cpython-36.pyc
selectors.cpython-36.opt-1.pyc
selectors.cpython-36.opt-2.pyc
selectors.cpython-36.pyc
shelve.cpython-36.opt-1.pyc
shelve.cpython-36.opt-2.pyc
shelve.cpython-36.pyc
shlex.cpython-36.opt-1.pyc
shlex.cpython-36.opt-2.pyc
shlex.cpython-36.pyc
shutil.cpython-36.opt-1.pyc
shutil.cpython-36.opt-2.pyc
shutil.cpython-36.pyc
signal.cpython-36.opt-1.pyc
signal.cpython-36.opt-2.pyc
signal.cpython-36.pyc
site.cpython-36.opt-1.pyc
site.cpython-36.opt-2.pyc
site.cpython-36.pyc
smtpd.cpython-36.opt-1.pyc
smtpd.cpython-36.opt-2.pyc
smtpd.cpython-36.pyc
smtplib.cpython-36.opt-1.pyc
smtplib.cpython-36.opt-2.pyc
smtplib.cpython-36.pyc
sndhdr.cpython-36.opt-1.pyc
sndhdr.cpython-36.opt-2.pyc
sndhdr.cpython-36.pyc
socket.cpython-36.opt-1.pyc
socket.cpython-36.opt-2.pyc
socket.cpython-36.pyc
socketserver.cpython-36.opt-1.pyc
socketserver.cpython-36.opt-2.pyc
socketserver.cpython-36.pyc
sre_compile.cpython-36.opt-1.pyc
sre_compile.cpython-36.opt-2.pyc
sre_compile.cpython-36.pyc
sre_constants.cpython-36.opt-1.pyc
sre_constants.cpython-36.opt-2.pyc
sre_constants.cpython-36.pyc
sre_parse.cpython-36.opt-1.pyc
sre_parse.cpython-36.opt-2.pyc
sre_parse.cpython-36.pyc
ssl.cpython-36.opt-1.pyc
ssl.cpython-36.opt-2.pyc
ssl.cpython-36.pyc
stat.cpython-36.opt-1.pyc
stat.cpython-36.opt-2.pyc
stat.cpython-36.pyc
statistics.cpython-36.opt-1.pyc
statistics.cpython-36.opt-2.pyc
statistics.cpython-36.pyc
string.cpython-36.opt-1.pyc
string.cpython-36.opt-2.pyc
string.cpython-36.pyc
stringprep.cpython-36.opt-1.pyc
stringprep.cpython-36.opt-2.pyc
stringprep.cpython-36.pyc
struct.cpython-36.opt-1.pyc
struct.cpython-36.opt-2.pyc
struct.cpython-36.pyc
subprocess.cpython-36.opt-1.pyc
subprocess.cpython-36.opt-2.pyc
subprocess.cpython-36.pyc
sunau.cpython-36.opt-1.pyc
sunau.cpython-36.opt-2.pyc
sunau.cpython-36.pyc
symbol.cpython-36.opt-1.pyc
symbol.cpython-36.opt-2.pyc
symbol.cpython-36.pyc
symtable.cpython-36.opt-1.pyc
symtable.cpython-36.opt-2.pyc
symtable.cpython-36.pyc
sysconfig.cpython-36.opt-1.pyc
sysconfig.cpython-36.opt-2.pyc
sysconfig.cpython-36.pyc
tabnanny.cpython-36.opt-1.pyc
tabnanny.cpython-36.opt-2.pyc
tabnanny.cpython-36.pyc
tarfile.cpython-36.opt-1.pyc
tarfile.cpython-36.opt-2.pyc
tarfile.cpython-36.pyc
telnetlib.cpython-36.opt-1.pyc
telnetlib.cpython-36.opt-2.pyc
telnetlib.cpython-36.pyc
tempfile.cpython-36.opt-1.pyc
tempfile.cpython-36.opt-2.pyc
tempfile.cpython-36.pyc
textwrap.cpython-36.opt-1.pyc
textwrap.cpython-36.opt-2.pyc
textwrap.cpython-36.pyc
this.cpython-36.opt-1.pyc
this.cpython-36.opt-2.pyc
this.cpython-36.pyc
threading.cpython-36.opt-1.pyc
threading.cpython-36.opt-2.pyc
threading.cpython-36.pyc
timeit.cpython-36.opt-1.pyc
timeit.cpython-36.opt-2.pyc
timeit.cpython-36.pyc
token.cpython-36.opt-1.pyc
token.cpython-36.opt-2.pyc
token.cpython-36.pyc
tokenize.cpython-36.opt-1.pyc
tokenize.cpython-36.opt-2.pyc
tokenize.cpython-36.pyc
trace.cpython-36.opt-1.pyc
trace.cpython-36.opt-2.pyc
trace.cpython-36.pyc
traceback.cpython-36.opt-1.pyc
traceback.cpython-36.opt-2.pyc
traceback.cpython-36.pyc
tracemalloc.cpython-36.opt-1.pyc
tracemalloc.cpython-36.opt-2.pyc
tracemalloc.cpython-36.pyc
tty.cpython-36.opt-1.pyc
tty.cpython-36.opt-2.pyc
tty.cpython-36.pyc
types.cpython-36.opt-1.pyc
types.cpython-36.opt-2.pyc
types.cpython-36.pyc
typing.cpython-36.opt-1.pyc
typing.cpython-36.opt-2.pyc
typing.cpython-36.pyc
uu.cpython-36.opt-1.pyc
uu.cpython-36.opt-2.pyc
uu.cpython-36.pyc
uuid.cpython-36.opt-1.pyc
uuid.cpython-36.opt-2.pyc
uuid.cpython-36.pyc
warnings.cpython-36.opt-1.pyc
warnings.cpython-36.opt-2.pyc
warnings.cpython-36.pyc
wave.cpython-36.opt-1.pyc
wave.cpython-36.opt-2.pyc
wave.cpython-36.pyc
weakref.cpython-36.opt-1.pyc
weakref.cpython-36.opt-2.pyc
weakref.cpython-36.pyc
webbrowser.cpython-36.opt-1.pyc
webbrowser.cpython-36.opt-2.pyc
webbrowser.cpython-36.pyc
xdrlib.cpython-36.opt-1.pyc
xdrlib.cpython-36.opt-2.pyc
xdrlib.cpython-36.pyc
zipapp.cpython-36.opt-1.pyc
zipapp.cpython-36.opt-2.pyc
zipapp.cpython-36.pyc
zipfile.cpython-36.opt-1.pyc
zipfile.cpython-36.opt-2.pyc
zipfile.cpython-36.pyc

File Transfer

Upload files to current directory

File Editor: modulefinder.cpython-36.opt-1.pyc

3 \Y@sdZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z e j e j de ddlZWdQRXejdZejdZejdZejdZeefZejZiZdd ZiZd d ZGd d d ZGdddZddZedkry eZWnek re dYnXdS)z3Find modules used by a script, using introspection.Nignore LOAD_CONST IMPORT_NAME STORE_NAME STORE_GLOBALcCstj|gj|dS)N)packagePathMap setdefaultappend)Z packagenamepathr $/usr/lib64/python3.6/modulefinder.pyAddPackagePath sr cCs |t|<dS)N)replacePackageMap)Zoldnamenewnamer r r ReplacePackage+src@seZdZdddZddZdS)ModuleNcCs(||_||_||_d|_i|_i|_dS)N)__name____file____path____code__ globalnames starimports)selfnamefiler r r r __init__1s zModule.__init__cCsLd|jf}|jdk r&|d|jf}|jdk r@|d|jf}|d}|S)Nz Module(%rz, %r))rrr)rsr r r __repr__>s   zModule.__repr__)NN)r __module__ __qualname__rrr r r r r/s rc@seZdZddggfddZddZddZd d Zd d Zd dZd7ddZ d9ddZ ddZ ddZ d:ddZ ddZddZddZd d!Zd ModuleFinderNrcCsB|dkrtj}||_i|_i|_||_d|_||_||_g|_dS)Nr) sysr modules badmodulesdebugindentexcludes replace_pathsprocessed_paths)rr r%r'r(r r r rIszModuleFinder.__init__cGs^||jkrZxt|jD]}tdddqWt|ddx|D]}tt|ddqr?r@)rrAdirrZextrBrCr r r load_fileps   zModuleFinder.load_filer5c Cs\|jdd|||||j||d}|j||\}}|j||}|sF|S|jrX|j||dS)N import_hook)r/)r4determine_parentfind_head_package load_tailrensure_fromlist) rrcallerfromlistr/parentqtailmr r r rJws  zModuleFinder.import_hookcCs(|jdd||| s|dkr.|jdddS|j}|dkr|jrJ|d8}|dkrn|j|}|jdd||S|jd|krtddj|jdd| }|j|}|jdd||S|jr|j|}|jdd||Sd|kr|j d}|d|}|j|}|jdd||S|jdddS) NrKrzdetermine_parent -> Noner5zdetermine_parent ->.zrelative importpath too deep) r6r7rrr#count ImportErrorjoinrErfind)rrOr/ZpnamerQr2r r r rKs<         zModuleFinder.determine_parentcCs|jdd||d|kr@|jd}|d|}||dd}n|}d}|r\d|j|f}n|}|j|||}|r|jdd||f||fS|r|}d}|j|||}|r|jdd||f||fS|jdd|td |dS) NrUrLrVr5r:z%s.%szfind_head_package ->z"raise ImportError: No module namedzNo module named )r6findr import_moduler7rX)rrQrr2headrSZqnamerRr r r rLs.  zModuleFinder.find_head_packagecCs|jdd|||}xz|r|jd}|dkr4t|}|d|||dd}}d|j|f}|j|||}|s|jdd|td|qW|jdd ||S) NrUrMrVrr5z%s.%sz"raise ImportError: No module namedzNo module named z load_tail ->)r6r[lenrr\r7rX)rrRrSrTr2r]Zmnamer r r rMs zModuleFinder.load_tailcCs|jdd|||xl|D]d}|dkrF|s||j|}|r||j||dqt||sd|j|f}|j|||}|std|qWdS)NrUrN*r5z%s.%szNo module named )r4find_all_submodulesrNhasattrrr\rX)rrTrP recursivesuballsubnameZsubmodr r r rNs   zModuleFinder.ensure_fromlistc Cs|js dSi}g}|tjjdd7}|tjjdd7}|tjjdd7}x|jD]}ytj|}Wn$tk r|j dd|wVYnXx\|D]T}d}x6|D].}t |} || d|kr|d| }PqW|r|dkr|||<qWqVW|j S)Nr8zcan't list directoryr) r importlib machineryEXTENSION_SUFFIXESSOURCE_SUFFIXESBYTECODE_SUFFIXESrDlistdirOSErrorr4r^keys) rrTr#suffixesrGnamesrmodZsuffnr r r r`s.    z ModuleFinder.find_all_submodulescCs|jdd|||y|j|}Wntk r4YnX|jdd||S||jkrb|jdddS|r|jdkr|jdddSy|j||o|j|\}}}Wn"tk r|jddddSXz|j||||}Wd|r|j X|rt ||||jdd||S)NrIr\zimport_module ->zimport_module -> None) r6r#KeyErrorr7r$r find_modulerXr@closesetattr)rZpartnamefqnamerQrTrBrArCr r r r\s6     zModuleFinder.import_modulec Cs|\}}}|jdd||od||tjkrH|j||}|jdd||S|tjkrht|jd|d} nj|tjkryt j j |j} Wn:t k r} z|jddt | |WYdd} ~ XnXtj| } nd} |j|}||_| r |jr|j| } | |_|j| ||jdd||S)Nr8r@rBzload_module -> execzraise ImportError: )r6r>Z PKG_DIRECTORY load_packager7r?compilereadZ PY_COMPILEDrf_bootstrap_external_validate_bytecode_headerrXr0marshalloads add_modulerr(replace_paths_in_coder scan_code) rrvrBrA file_infosuffixmodetyperTcoZ marshal_dataexcr r r r@s2         zModuleFinder.load_modulecCs<||jkri|j|<|r*d|j||j<nd|j|d<dS)Nr5-)r$r)rrrOr r r _add_badmodule4s   zModuleFinder._add_badmodulecCs||jkr|j||dSy|j|||dWn@tk rn}z$|jddt||j||WYdd}~XnX|rx|D]}||jkr|j||q|y|j|||g|dWq|tk r}z0|jddt||d|}|j||WYdd}~Xq|Xq|WdS)N)r/r8z ImportError:rV)r$rrJrXr4r0)rrrOrPr/r4rcfullnamer r r _safe_import_hook<s&      zModuleFinder._safe_import_hookc cs|j}|j}|j}ddtj|D}xt|D]\}\}}|tkrVd||ffVq0|tkr0|dkr0||dd||ddkotknr0|||dd} |||dd} | dkrd| ||ffVq0d| | ||ffVq0q0WdS) NcSs"g|]\}}}|tkr||fqSr ) EXTENDED_ARG).0_opr3r r r Xsz-ModuleFinder.scan_opcodes..storer8r5rabsolute_importrelative_import) co_codeco_names co_constsdisZ_unpack_opargs enumerate STORE_OPSrr) rrcoderoconstsZopargsr2rZopargr/rPr r r scan_opcodesSs 0zModuleFinder.scan_opcodescCs|j}|j}xT||D]F\}}|dkr<|\}d|j|<q|dkr|\}}d} |dk rtd|krfd} dd|D}|j|||dd| r`d} |jr|jj|jd |} | dkr|jj|} | dk r|jj| j|j j| j | j dkrd|j |<n d|j |<q|d krX|\} }}|r4|j|||| dn"|j || d} |j| jd|ddqt |qWx,|j D]"} t| t|rl|j| |qlWdS) Nrr5rrr_cSsg|]}|dkr|qS)r_r )rfr r r rusz*ModuleFinder.scan_code..)r/rVr)rrrrrr#getrupdaterrrK RuntimeErrorr isinstancerr)rrrTrscannerZwhatr1rrPZ have_starZmmr/rQcr r r rhsH          zModuleFinder.scan_codec Cs|jdd||tj|}|r"|}|j|}||_|g|_|jtj|g|_|jd|j\}}}z"|j|||||j dd||S|r|j XdS)Nr8ryrzload_package ->) r6rrrrrrrsr@r7rt)rrvrArrTrBZbufrCr r r rys  zModuleFinder.load_packagecCs*||jkr|j|St||j|<}|S)N)r#r)rrvrTr r r rs  zModuleFinder.add_modulecCsr|dk r|jd|}n|}||jkr<|jdd|t||dkrf|tjkr`ddddtjffS|j}tj ||S)NrVrIzfind_module -> Excludedr:) rr'r7rXr"builtin_module_namesr>Z C_BUILTINr rs)rrr rQrr r r rss  zModuleFinder.find_modulecCs"ttddtddt|jj}xJ|D]B}|j|}|jrTtdddn tdddtd ||jppd q2W|j\}}|rttd x2|D]*}t|j|j}td |d dj|qW|rttdddtdx2|D]*}t|j|j}td |d dj|qWdS)zPrint a report to stdout, listing the found modules with their paths, as well as modules that are missing, or seem to be missing. z %-25s %sNameFile----Pr*)r+rTz%-25sr:zMissing modules:?z imported fromz, z7Submodules that appear to be missing, but could also bez#global names in the parent package:N)rr)rr) r-sortedr#rmrrany_missing_mayber$rY)rrmkeyrTmissingmayberZmodsr r r reports0         zModuleFinder.reportcCs|j\}}||S)zReturn a list of modules that appear to be missing. Use any_missing_maybe() if you want to know which modules are certain to be missing, and which *may* be missing. )r)rrrr r r any_missings zModuleFinder.any_missingcCsg}g}x|jD]}||jkr q|jd}|dkr>|j|q||dd}|d|}|jj|}|dk r||j|kr|j|q||jkrq|jr|j|q|j|q|j|qW|j|j||fS)aReturn two lists, one with modules that are certainly missing and one with modules that *may* be missing. The latter names could either be submodules *or* just global names in the package. The reason it can't always be determined is that it's impossible to tell which names are imported when "from module import *" is done with an extension module, short of actually importing it. rVrr5N) r$r'rZr r#rrrsort)rrrrr2reZpkgnameZpkgr r r rs0           zModuleFinder.any_missing_maybecCstjj|j}}x2|jD](\}}|j|r||t|d}PqW|jr||jkr||krt|j dd||fn|j dd|f|jj |t |j }x8t t|D](}t||t|r|j||||<qWtj|j|j|j|j|j|jt||j|j||j|j|j|j|j S)Nr8zco_filename %r changed to %rz co_filename %r remains unchanged)!rDr normpath co_filenamer( startswithr^r%r)r7r listrr,rrrtypesCodeType co_argcountco_kwonlyargcount co_nlocals co_stacksizeco_flagsrtupler co_varnamesco_nameco_firstlineno co_lnotab co_freevars co_cellvars)rrZ new_filenameZoriginal_filenamerr;rr2r r r rs,        z"ModuleFinder.replace_paths_in_code)NNrr)r)rr)r)N)rrr rr4r6r7r9rHrJrKrLrMrNr`r\r@rrrrryrrsrrrrr r r r r!Gs2   #  1 ".r!cCsddl}y|jtjddd\}}Wn*|jk rP}z t|dSd}~XnXd}d}g}g}xb|D]Z\}} |dkr|d}|dkrd}|dkr|| jtj}|dkrd}|dkrh|j| qhW|sd } n|d} tj dd} tj j | | d<|| } |dkr.td x| D]} td t | qWt | ||} xp|ddD]`}|dkr^d}qH|r|ddd kr| j |ddddgn | j |n | j|qHW| j| | j| S)Nrr5zdmp:qx:z-dz-mz-pz-qz-xzhello.pyzpath:z r8z.*r_r)getoptr"argverrorr-rErDpathsepr r dirnamer.r!rJrHr9r)rZoptsr1r4r%ZdomodsZaddpathZexcludeoaZscriptr itemmfr3r r r test:sX      rr<z [interrupted])!__doc__rZimportlib._bootstrap_externalrfimportlib.machineryr~rDr"rZstructwarningscatch_warnings simplefilterDeprecationWarningr>Zopmaprrrrrrrr rrrr!rrrKeyboardInterruptr-r r r r sB      v;