This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年09月29日 06:57 by steven.daprano, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg93254 - (view) | Author: Steven D'Aprano (steven.daprano) * (Python committer) | Date: 2009年09月29日 06:57 | |
In Python 2.6, .pyc files inherit the executable bit from their .py file. This can lead to strangeness: $ echo pass > test.py $ chmod u+x test.py $ python2.6 -c "import test" $ ls -l test.pyc -rwxrw-r-- 1 steve steve 94 2009年09月29日 16:54 test.pyc $ ./test.pyc : command not found �� |
|||
| msg93281 - (view) | Author: Skip Montanaro (skip.montanaro) * (Python triager) | Date: 2009年09月29日 11:51 | |
Steven> $ echo pass > test.py Steven> $ chmod u+x test.py Steven> $ python2.6 -c "import test" Steven> $ ls -l test.pyc Steven> -rwxrw-r-- 1 steve steve 94 2009年09月29日 16:54 test.pyc Steven> $ ./test.pyc Steven> : command not found And if you try ./test.py I presume you also get an error in this trivial case. If your .py file is not meant to be executed, why set the execute bit? I do agree it's a little strange to also set the execute bit on the .pyc file though. Skip |
|||
| msg93283 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2009年09月29日 12:15 | |
This is a duplicate of issue 6070, and has been fixed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:53 | admin | set | github: 51265 |
| 2009年09月29日 12:15:12 | r.david.murray | set | status: open -> closed priority: normal superseder: Python 2.6 makes .pyc/.pyo bytecode files executable nosy: + r.david.murray messages: + msg93283 resolution: out of date stage: resolved |
| 2009年09月29日 11:51:40 | skip.montanaro | set | nosy:
+ skip.montanaro messages: + msg93281 |
| 2009年09月29日 06:57:07 | steven.daprano | create | |