os.path.dirname(os.path.realpath(__file__))
will find your current working directory, but if I'm running the python shell, __file__
is undefined, so that method throws an exception.
How can you find your current working directory while inside a Python shell?
Running: Windows 7, Python 3.3, VirtualEnv