Message106417
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. |
|
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 | |
|