Re: [Tutor] which file runs

2006-12-05 Thread Christopher Arndt
Chris Hengge wrote: > I have a script that makes my python scripts into .pyc files and I can > run those without a .py in the directory or anywhere else on the system > for that matter. No clever tricks needed. You're right. Probably this trick was only needed in (very) old versions of Python.

Re: [Tutor] which file runs

2006-12-05 Thread Alan Gauld
"Luke Paireepinart" <[EMAIL PROTECTED]> wrote >> I have a script that makes my python scripts into .pyc files and I >> can >> run those without a .py in the directory or anywhere else on the >> system for that matter. No clever tricks needed. >> > Why would you want to do this? I haven't measur

Re: [Tutor] which file runs

2006-12-05 Thread Chris Hengge
Quick and dirty way to keep people from lookin at the code. On 12/5/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote: Chris Hengge wrote: > I have a script that makes my python scripts into .pyc files and I can > run those without a .py in the directory or anywhere else on the > system for that

Re: [Tutor] which file runs

2006-12-05 Thread Luke Paireepinart
Chris Hengge wrote: > I have a script that makes my python scripts into .pyc files and I can > run those without a .py in the directory or anywhere else on the > system for that matter. No clever tricks needed. > Why would you want to do this? ___ Tutor

Re: [Tutor] which file runs

2006-12-05 Thread Chris Hengge
I have a script that makes my python scripts into .pyc files and I can run those without a .py in the directory or anywhere else on the system for that matter. No clever tricks needed. On 12/1/06, Christopher Arndt <[EMAIL PROTECTED]> wrote: Addendum: these rules only apply to Python *modules*.

Re: [Tutor] which file runs

2006-12-01 Thread Christopher Arndt
Addendum: these rules only apply to Python *modules*. AFAIK, when you call a Python file as a script, no matching .pyc/.pyo file is used or generated. There are some clever tricks to run a .pyc file as a script. I think it is described in the Python CGI FAQ. Chris

Re: [Tutor] which file runs

2006-12-01 Thread Christopher Arndt
Chris Hengge schrieb: > My understanding is that whenever you run a script that has a newer.py, > the .py runs, otherwise it automagically will use the .pyc Not exactly. Whenever there is a .py file and no .pyc file is present or the .pyc file is older, Python will read the .py file, compile it in

Re: [Tutor] which file runs

2006-12-01 Thread Chris Hengge
My understanding is that whenever you run a script that has a newer.py, the .py runs, otherwise it automagically will use the .pyc On 12/1/06, johnf <[EMAIL PROTECTED]> wrote: Hi, if there is a pyc and a py file within a module and the py file has a later date which file will python run? John