Re: [Python-Dev] PYC Magic
"Gordon McMillan"
On 1 Jun 2002 at 10:15, Neal Norwitz wrote:
Guido van Rossum wrote:
What do you mean by "can't be written to disk"?
Disk full was one condition.
I can't be 100% sure of the cause, but I *have* seen this (a bad .pyc file that had to be deleted before the module would import). The .pyc was woefully short but passed the magic test. I think this was 2.1, maybe 2.0.
Someone on comp.lang.python reported getting corrupt .pycs by having modules in a user-writeable directory being accessed more-or-less simultaneously by different Python versions. I'm not sure what could be done aobut that. Cheers, M. -- First of all, email me your AOL password as a security measure. You may find that won't be able to connect to the 'net for a while. This is normal. The next thing to do is turn your computer upside down and shake it to reboot it. -- Darren Tucker, asr
Michael Hudson
Someone on comp.lang.python reported getting corrupt .pycs by having modules in a user-writeable directory being accessed more-or-less simultaneously by different Python versions. I'm not sure what could be done aobut that.
The user could remove write permission on that directory. I think Python should provide an option to never write .pyc files, controllable through sys.something. Regards, Martin
[Martin v. Loewis wrote]
I think Python should provide an option to never write .pyc files, controllable through sys.something.
+1 ActivePython's uninstallation process has a custom action (which uses the installed Python) to remove .pyc files before the MSI process removes the other files. That process *creates* new .pyc files which makes uninstallation a little bit of a pain. Trent -- Trent Mick TrentM@ActiveState.com
Someone on comp.lang.python reported getting corrupt .pycs by having modules in a user-writeable directory being accessed more-or-less simultaneously by different Python versions. I'm not sure what could be done about that.
Yes, that doesn't work... I suggest to create copies of the code per Python version. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (4)
-
Guido van Rossum
-
martin@v.loewis.de
-
Michael Hudson
-
Trent Mick