Message106419
| Author |
Sebastian |
| Recipients |
Sebastian, amaury.forgeotdarc, brett.cannon |
| Date |
2010年05月25日.08:33:42 |
| SpamBayes Score |
0.039645873 |
| Marked as misclassified |
No |
| Message-id |
<1274776425.12.0.605276567769.issue8787@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Oh, damn. I really forgot the argv filename thing. Nevermind :)
But back to topic. __file__ might be not the best solution for that. What does Python when embedded, and __file__ is not set? That can happen when the source of your code is not a file (multiline textbox, ...)
I would simply follow the way how the traceback solves this. Just print out the filename passed to:
Py_CompileStringFlags(const char *str, const char *filename, int start, PyCompilerFlags *flags)
PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit, PyCompilerFlags *flags)
[...] |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年05月25日 08:33:45 | Sebastian | set | recipients:
+ Sebastian, brett.cannon, amaury.forgeotdarc |
| 2010年05月25日 08:33:45 | Sebastian | set | messageid: <1274776425.12.0.605276567769.issue8787@psf.upfronthosting.co.za> |
| 2010年05月25日 08:33:43 | Sebastian | link | issue8787 messages |
| 2010年05月25日 08:33:42 | Sebastian | create |
|