Re: [Tutor] Moved Python installation. Need advice rebuilding all *.pyc
On 03/07/06, Andreas <[EMAIL PROTECTED]> wrote: On 03.07.2006 20:45 Adam wrote> Erm trying to remember exactly how to do this in windows but if you do the> equivalent of an rm -r E:\Python24\site-packages\*.pyc ie remove all the> *.pyc files they will be rebuilt as and when you next import those modules. Thanks for the info. However, if this is being done automatically onimport, why does "python setup.py install" often do some compilation ?It reduces the loading time for the modules if there is already a *.pyc so the setup script often does it in advance. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Moved Python installation. Need advice rebuilding all *.pyc
On Mon, 2006-07-03 at 22:34 +0200, Andreas wrote: > On 03.07.2006 20:45 Adam wrote > > > Erm trying to remember exactly how to do this in windows but if you do the > > equivalent of an rm -r E:\Python24\site-packages\*.pyc ie remove all the > > *.pyc files they will be rebuilt as and when you next import those modules. > > Thanks for the info. However, if this is being done automatically on > import, why does "python setup.py install" often do some compilation ? There is a program called compileall.py. I'm on linux and do not know the default Windows location. cd E:\Python24\site-packages python ???\python2.4\???\compileall.py . Linux: /usr/lib/python2.4/compileall.py It will provide some help info if asked. python ???\python2.4\???\compileall.py --help > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor -- Lloyd Kvam Venix Corp ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Moved Python installation. Need advice rebuilding all *.pyc
On 03.07.2006 20:45 Adam wrote > Erm trying to remember exactly how to do this in windows but if you do the > equivalent of an rm -r E:\Python24\site-packages\*.pyc ie remove all the > *.pyc files they will be rebuilt as and when you next import those modules. Thanks for the info. However, if this is being done automatically on import, why does "python setup.py install" often do some compilation ? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Moved Python installation. Need advice rebuilding all *.pyc
On 03/07/06, Andreas <[EMAIL PROTECTED]> wrote: Hi,I thought, this would be more easy. I wonder why the PYTHONPATH is notbeing considered here, but instead I find the path to modules beinghardcoded in the *.pyc file.I have about 50 3rd party modules installed and I moved my Python installation from C:\Python24 to another partition (E:\Python24).Now, what can I say ? It seems I need to rebuild all, but this would bean immense amount of work (finding all the install-archives on the net, etc.)Is there any simple way ? Maybe a script, that iterates through"Lib/site-packages" ?Thanks a lot!Erm trying to remember exactly how to do this in windows but if you do the equivalent of an rm -r E:\Python24\site-packages\*.pyc ie remove all the *.pyc files they will be rebuilt as and when you next import those modules. HTH.Adam ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Moved Python installation. Need advice rebuilding all *.pyc
Hi, I thought, this would be more easy. I wonder why the PYTHONPATH is not being considered here, but instead I find the path to modules being hardcoded in the *.pyc file. I have about 50 3rd party modules installed and I moved my Python installation from C:\Python24 to another partition (E:\Python24). Now, what can I say ? It seems I need to rebuild all, but this would be an immense amount of work (finding all the install-archives on the net, etc.) Is there any simple way ? Maybe a script, that iterates through "Lib/site-packages" ? Thanks a lot! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor