jose3f23
May 24, 2013 - 08:00
I am trying import a module in a subdirectory using the interactive prompt. Module is not found because it seems Pythonista does not set correctly the path to the current subdirectory.
I am trying import a module in a subdirectory using the interactive prompt. Module is not found because it seems Pythonista does not set correctly the path to the current subdirectory.
The interactive prompt interpreter is entirely independent from the script editor, so the current directory will always be the documents root, unless you change it with os.chdir().
I use:
sys.path.append('.') and it works.
Thanks