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

IntelliSense not working for QSTK external module

Mar 3, 2013 at 8:29 PM
Hi, hope someone can help - I'm trying to use QSTK (Quant Software ToolKit, with the plugin, but the IntelliSense doesn't work. The scanning part is working okay I think - the idb files are generated correctly, and if I strip off QSTK. from the start of the import statements then it picks up the types fine, i.e:

Broken: import QSTK.qstkutil.qsdateutil as du
Working: import qstkutil.qsdateutil as du

But stripping off the QSTK means the program doesn't actually run. I'm new to Python so am probably missing something obvious, but any help would be appreciated!
Mar 4, 2013 at 5:07 PM
This appears to be because when QSTK installs, they use a .pth file with code instead of creating a package.

An immediate workaround to get you going again is to open the QSTK folder (probably C:\Python27\Lib\site-packages\QSTK) and create an empty file in there called "". You'll need to regenerate the database, but it should work fine after that.

Because that file is missing, we don't recognize the QSTK folder as part of the package. The interpreter uses the QSKT-0.2.5-py2.7-nspkg.pth file to modify your search paths at runtime so that you can find it. It is my understanding that running arbitrary code like this is an exploit rather than a feature, so it's unlikely we'll support it officially and in any case there's no way for us to parse their file correctly (it depends on being called from a specific function inside We'll discuss it internally and figure out what we can do to avoid this being a problem in future.
Mar 4, 2013 at 6:59 PM
That worked! Many thanks for the workaround and explanation, I'll feed that back to the QSTK guys. Also thanks for a fantastic tool, great to see MS investing in things like this - now I don't have to go put up with Eclipse :)