__pycache__, one more good reason to stck with Python 2?

John Pinner funthyme at gmail.com
Thu Jan 20 08:09:50 EST 2011


Hi

You have disturbe my slumber, Steven ;-)

On Jan 19, 2:42 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> On Tue, 18 Jan 2011 00:58:14 -0800, jmfauth wrote:
> > It is now practically impossible to launch a Python application via a
> > .pyc file.
>
> When has that ever been possible?
>
> .pyc files are Python byte-code. You can't run them directly using Python
> (except via the import machinery), you can't run them as a script,
> they're not machine code. Unless you write a wrapper to import the file
> as a module, you can't directly execute .pyc files.

Not true. 'python myprog.pyc' has worked for as long as I have been
using Python. Whether or not it is a good idea is another matter.

Probably it would be best to check what you're saying before posting
such a bald assertion, even though you were 110% sure of what you were
saying. I've been there, done that, bought the tee-shirt.

Best wishes,

John
--



More information about the Python-list mailing list