By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,525 Members | 1,689 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,525 IT Pros & Developers. It's quick & easy.

Re: Calling Python from Python and .pyc problem

P: n/a
Terry Reedy wrote:
David Shi wrote:
>Hello, there.

I am using Python 2.5. I used py_compile and made a .pyc file.

No need usually.
>However, it runs but never stops. What is the best way to

compile a .py file.

When you run a .py file, it automatically compiles and write a .pyc file
if there is no .pyc file or if the .py is newer than the .pyc.
True only if you replace "run" with "import". It also creates a new .pyc
file if an existing valid .pyc was created by some other version of Python.

However, I suspect the OP's problem is nothing to do with .pyc files,
but rather to do with writing algorithms that terminate.

The question was about as useful as "I have a car that won't start, will
you please tell me how to fix it". Unfortunately it appears the Python
is so valuable we are not to be allowed to see it.

Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC

Nov 7 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.