I couldn't find this issue anywhere else here, so I thought I'd post it. If it's a known problem or if there's a status on when it will be fixed, could someone communicate this?
The problem is reproducable as follows:
- Create a Python project in Visual Studio (I use VS2010, Python Tools 1.5 Beta 1)
- Add a new directory to the project (dir1)
- Add a subdirectory to the directory dir1 (dir2)
- Add a subdirectory to the directory dir2 (dir3)
- Add a file in the directory dir1/dir2/dir3 (module1.py) #this file is placed in the wrong directory
- Add a file in the directory dir1/dir2 (module_correct.py) #this file is placed in the correct directory
The hierarchy is supposed to look like this:
In Visual Studio it appears like that, however, the files are stored in different locations on the file system. If you examine the directory structure in Windows Explorer, it looks like this:
This causes problems when running the program and importing those modules, because they reside in different directories than expected.
It makes PythonTools quite unusable for large packages with subdirectories at the moment. Attached is the Visual Studio Python project that is created when following the steps described above.