Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1301f2b

Browse files
committed
__file__ now sometimes refers to the .pyc file
1 parent a4f0309 commit 1301f2b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Mac/Lib/findmodulefiles.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ def mkpycresourcefile(list, main='', dst=None):
8080
print '%5d\t%s\t%s'%(id, name, main)
8181
for name, location in list:
8282
if not location: continue
83+
if location[-4:] == '.pyc':
84+
# Attempt corresponding .py
85+
location = location[:-1]
8386
if location[-3:] != '.py':
8487
print '*** skipping', location
8588
continue

0 commit comments

Comments
 (0)