Peter Simanyi <psima...@namcobandaigames.com> added the comment: Oops, I was not accurate in reporting behavior: I now believe that this fails on Windows XP, but may work fine on Linux. Below are my results, showing reproducible failure on XP. The most important thing about this is: on XP, once the .pyc file is "broken", Python will not overwrite it, and it must be *manually* removed. This is bad!
I will append Ubuntu results in a few minutes. To reproduce the problem, I had to modify the script to include a "sleep", see attached showpyreadonlysleep.sh (cygwin bash script). Here's the results of running showpyreadonlysleep.sh, then manually reproducing the problem with "touch/python": $ ./showpycreadonlysleep.sh umask = 0022 CYGWIN_NT-5.1 psimanyi_xp 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin Python 2.6.2 Running python.exe from: /cygdrive/c/Python26/python -rw-r--r-- 1 psimanyi mkgroup-l-d 10 May 26 12:43 b.py b -rwx------+ 1 psimanyi mkgroup-l-d 137 May 26 12:43 b.pyc b -r-x------+ 1 psimanyi mkgroup-l-d 137 May 26 12:43 b.pyc # c:\Documents and Settings\psimanyi\b.pyc has bad mtime import b # from c:\Documents and Settings\psimanyi\b.py # can't create c:\Documents and Settings\psimanyi\b.pyc And now, running manually: $ touch b.py psima...@psimanyi_xp ~ $ python -v a.py 2>&1 | grep 'b\.py' # c:\Documents and Settings\psimanyi\b.pyc has bad mtime import b # from c:\Documents and Settings\psimanyi\b.py # can't create c:\Documents and Settings\psimanyi\b.pyc psima...@psimanyi_xp ~ $ touch b.py psima...@psimanyi_xp ~ $ python -v a.py 2>&1 | grep 'b\.py' # c:\Documents and Settings\psimanyi\b.pyc has bad mtime import b # from c:\Documents and Settings\psimanyi\b.py # can't create c:\Documents and Settings\psimanyi\b.pyc Again, this shows that without removing the .pyc manually, the pyc will not be overwritten, and therefore program startup will be slow! ---------- Added file: http://bugs.python.org/file14083/showpycreadonlysleep.sh _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6074> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com