ipython/ipython — Issue #1240: sys.path missing `''` as first entry when kernel launched without interface
Author: rabbitmcrabbit
Created: 2012-01-06 13:01:03+00:00
State: open

Quite simply, if I launch `ipython` or `ipython console` or `ipython qtconsole`, then `import sys`, it should be the case that `sys.path[0]` is `''`, so that modules in the current directory can be found, just like in a standard python session. However, if I begin by launching `ipython kernel`, and then attach a console/qtconsole to the kernel, this item is not in `sys.path`, so modules in the current directory cannot be imported (unless the current directory is in `$PYTHONPATH` to start with). To confirm, this bug is not present if I launch a console/qtconsole and then attach another interface to the existing session.