LionHeart123 / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Relative imports failing when package name == module name #656

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please see: 
http://stackoverflow.com/questions/9207309/relative-imports-in-pyscripter-failin
g-ok-in-idle

This is an issue with relative imports failing (in PyScripter, but not in IDLE) 
when package name is same as filename (ie foo/foo.py)

What version of the product are you using? On what operating system?
PyScripter 2.4.3, Python 2.7, Windows XP 32-bit

Please provide any additional information below.

Original issue reported on code.google.com by uwadba...@gmail.com on 15 May 2012 at 4:52

GoogleCodeExporter commented 9 years ago
If you type 
>>> import sys
>>> print sys.path

what do you get?  (in the Stackoverflow example)

Original comment by pyscripter on 16 May 2012 at 1:27

GoogleCodeExporter commented 9 years ago
This was on my work computer - I added a directory ('pypath', in this case) to 
my PYTHONPATH environmental variable. Should I compare the results of sys.path 
from IDLE and PyScripter?

Original comment by uwadba...@gmail.com on 16 May 2012 at 3:31

GoogleCodeExporter commented 9 years ago
Yes.  I think this might explain the issue.

Original comment by pyscripter on 16 May 2012 at 6:35