]> granicus.if.org Git - python/commitdiff
__file__ now sometimes refers to the .pyc file
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 2 Mar 1998 16:57:01 +0000 (16:57 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 2 Mar 1998 16:57:01 +0000 (16:57 +0000)
Mac/Lib/findmodulefiles.py

index 0a55c8fa446265b3ef7f422a00b085a60a3413fe..267e89e30ce84b725539ffd2a5363ee7c4c259a1 100644 (file)
@@ -80,6 +80,9 @@ def mkpycresourcefile(list, main='', dst=None):
                print '%5d\t%s\t%s'%(id, name, main)
        for name, location in list:
                if not location: continue
+               if location[-4:] == '.pyc':
+                       # Attempt corresponding .py
+                       location = location[:-1]
                if location[-3:] != '.py':
                        print '*** skipping', location
                        continue