__pycache__, one more good reason to stck with Python 2?
Alice Bevan–McGregor
alice at gothcandy.com
Wed Jan 19 17:31:15 EST 2011
On 2011-01-19 13:01:04 -0800, Steven D'Aprano said:
> I know I've seen problems executing .pyc files from the shell in the
> past... perhaps I was conflating details of something else. Ah, I know!
>
> [steve at sylar ~]$ chmod u+x toto.pyc
> [steve at sylar ~]$ ./toto.pyc
> : command not found ��
> ./toto.pyc: line 2: syntax error near unexpected token `('
> ./toto.pyc: line 2: `P7Mc at s dGHdS(tfooN((((s ./
> toto.py<module>s'
... don't do that. I do not know why that would be expected to work,
ever. (Unless you're crafty and wrap a real shell script around the
.pyc, in which case it's no longer a .pyc.)
— Alice.
More information about the Python-list
mailing list