Message106417
| Author |
amaury.forgeotdarc |
| Recipients |
Sebastian, amaury.forgeotdarc, brett.cannon |
| Date |
2010年05月25日.08:04:28 |
| SpamBayes Score |
0.026322545 |
| Marked as misclassified |
No |
| Message-id |
<1274774671.77.0.38204397152.issue8787@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Yes, the warnings module tries to display the file name. Inside PyRun_SimpleString(), globals()['__name__'] == '__main__', and the warnings module supposes that argv[1] is the name of the script.
I wonder whether __file__ would be more accurate: it is filled when running a script, but not when running a string. And sys.argv would not be used any more. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年05月25日 08:04:32 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, brett.cannon, Sebastian |
| 2010年05月25日 08:04:31 | amaury.forgeotdarc | set | messageid: <1274774671.77.0.38204397152.issue8787@psf.upfronthosting.co.za> |
| 2010年05月25日 08:04:30 | amaury.forgeotdarc | link | issue8787 messages |
| 2010年05月25日 08:04:29 | amaury.forgeotdarc | create |
|