Message88388
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
psimanyi@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
psimanyi@psimanyi_xp ~
$ touch b.py
psimanyi@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! |
|
Date |
User |
Action |
Args |
2009-05-26 19:47:07 | pdsimanyi | set | recipients:
+ pdsimanyi, markon |
2009-05-26 19:47:06 | pdsimanyi | set | messageid: <1243367226.93.0.0932337161956.issue6074@psf.upfronthosting.co.za> |
2009-05-26 19:47:04 | pdsimanyi | link | issue6074 messages |
2009-05-26 19:47:02 | pdsimanyi | create | |
|