iPython executes org.py in directory
Florian Lindner <[email protected]> Fri, 20 May 2016 12:59:07 +0200
| Newsgroups | gmane.comp.python.ipython.user |
|---|---|
| Message-ID | <2500296.mQ5dAzRk3c@asaru> |
Hello, I have a file named org.py in the current working directory. Whenever I start ipython 4.2.0, it executes this file: florian@asaru ~/scratch/calorg (git)-[master] % ipython [ org.py output ] Python 3.5.1 (default, Mar 3 2016, 09:29:07) Type "copyright", "credits" or "license" for more information. IPython 4.2.0 -- An enhanced Interactive Python. [...] florian@asaru ~/scratch/calorg (git)-[master] % mv org.py foobar.py florian@asaru ~/scratch/calorg (git)-[master] % ipython Python 3.5.1 (default, Mar 3 2016, 09:29:07) Type "copyright", "credits" or "license" for more information. IPython 4.2.0 -- An enhanced Interactive Python. [...] When I rename the file so something else it is no being executed. org.py is an ordinary python script, without a shebang, and without a def __main__ (but some code on the leftmost indent). Why is file being executed? Is its name somehow special? I haven't found anything about org.py being special. Thanks, Florian