I had the same issue recently.
What would be the best way in a script to get its own filename than?
Thanks,
Dietrich
Il giorno martedì 13 ottobre 2015 22:32:24 UTC+2, Almar Klein ha scritto:
>
> __file__ is only present when running a file as script. Similar to how
> there is no __file__ in
Is there another way to obtain the same result in python without using
magics?
There are many use cases but at least I would like to be able at least to:
1) run/call a script from another script
this is achieved in ipython with %run -i myFile.py
2) make python use changes when you edit a file