This project has moved and is read-only. For the latest updates, please go here.

Intellisense doesn't work with packages ?

Apr 16, 2015 at 10:59 AM
Edited Apr 16, 2015 at 11:09 AM
I'm using the latest version of Python tools, and VS 2013.
I have some problems that the intellisense doesn't work with my packages :(
This is the structure of my working directory :
  |-- python solution & python project files
  |-- package1 (folder)
import package1 .package1_file1
it can build without error . But the intellisense doesn't work :( , it tell that package1:<unknown type> , so the code suggestion failed.

If in, I use :
import WorkingFolder.package1.package1_file1
the intellisense can work :( but can not build success ( both VS and run from command line ).

if in :
the intellisense also doesn't work :(

The second problem is I could not found anyway to add a new (empty) package to project . I must do it by add a empty folder, then add Is there any faster way to add a new package ?
Do anyone have experience on these problems? Help me please :(
Thank you so much !
Apr 16, 2015 at 6:37 PM
I think your problem is that you have inside your WorkingFolder, making it a package. Is it really the expected behavior? If so, you may want to move the solution & project files one level up. Otherwise, just get rid of

As it is, you're basically making a relative import from within a package to another module in that package. The preferred syntax for that is explicit: from .package1 import package1_file1 (note the leading dot in "from"). See here for more details.