Hello everyone:
If i am in the following situation
project/
package/
module.py
module_test.py
where module.py contains a function foo to be tested in module_test.py.
*Case one: *the default working directory for module_test.py is
project/package
Then I should do in module_test.py
# module_test.py
from module import foo
This works perfectly, but if I run the same code in an ipython console, in
the project directory, I get an import error. The correct way to import foo
would then be
>> from package.module import foo
*Case two: *Then a good practice in spyder would be to write
# module_test.py
from package.module import foo
in module_test.py, and configure the default working directory of
module_test.py to be "project", so that the same code will work in both
situations. (Using run selection or runfile).
However, it seems that the spyder does not take into account the working
directory of "Run settings" but only the default working directory of the
preference dialog.
Is it a bug or am I missing something?
Cheers,
Sylvain
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.