Run the file as a script. Running code normally (not as a script) is equivalent to firing up having a Python interpreter and running code in it. There is no script file, and thus no __file__. Technically, Pyzo could set __file__ each time a file is run, but it would be wrong to reset that variable.
I recently made a change to set the current directory when a file is run also if its *not* run as a script. In this case practicality beats purity, plus the current directory is expected to be more dynamic than the value of __file__. - Almar From: Dietrich Pescoller -- You received this message because you are subscribed to the Google Groups "Pyzo" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.