[Tutor] .py vs .pyc

2012-04-19 Thread Max S.
Could anyone tell me why I should use a .pyc file rather than a .py? After doing some research, I have found that a .py file is first precompiled and then run, while a .pyc file is already precompiled and is simply run. But unless I'm mistaken, it seems that a .pyc is no faster or better than a

Re: [Tutor] .py vs .pyc

2012-04-19 Thread Max S.
Then if I understand correctly, I work with .py files and (should) run them as .pyc files? On Thu, Apr 19, 2012 at 10:55 AM, Russel Winder rus...@winder.org.ukwrote: On Thu, 2012-04-19 at 10:47 -0400, Max S. wrote: Could anyone tell me why I should use a .pyc file rather than a .py? After

Re: [Tutor] .py vs .pyc

2012-04-19 Thread Russel Winder
On Thu, 2012-04-19 at 10:47 -0400, Max S. wrote: Could anyone tell me why I should use a .pyc file rather than a .py? After doing some research, I have found that a .py file is first precompiled and then run, while a .pyc file is already precompiled and is simply run. But unless I'm

Re: [Tutor] .py vs .pyc

2012-04-19 Thread Russel Winder
On Thu, 2012-04-19 at 10:57 -0400, Max S. wrote: Then if I understand correctly, I work with .py files and (should) run them as .pyc files? No, you always run the py files, don't worry about the pyc files at all, the PVM will do what it does. -- Russel.

Re: [Tutor] .py vs .pyc

2012-04-19 Thread Alan Gauld
On 19/04/12 15:47, Max S. wrote: Could anyone tell me why I should use a .pyc file rather than a .py? You don't, python handles that for you. They only come into effect on import statement. When Python imports the module it will use the pyc if available (and more recent that the .py). Don't