I have been trying to set up PyScripter so that I can make use of code completion for QGIS python code. So far, I have been unable to get things to work.

  1. PyScripter when set up as per instructions in the python cookbook is not starting. I have set up a batch file with the following contents to launch PyScripter.

    SET PYTHONHOME=C:\OSGeo4W\dev\bin
    PyScripter --python27 --pythonpathdll C:\OSGeo4W\dev\bin %1 %2 %3 %4 %5
  2. The next issue is registering QGIS core in PyScripter. In the PyScripter help file this is done by just adding the names of the libraries into the Tools\Options\IDE Options..Special packages area. Some special packages such as wx and scipy are in there already but I suspect that qgis needs path specified somewhere so that correct qgis can be found. Just adding qgis to the list of special packages and then placing from qgis import core into a py file does not result in qgis classes and method becoming available in the code explorer.

Regarding point 1, PyScripter starts and displays a list of valid command line arguments and then quits without loading. PyScripter was installed via an installer (32 bit) and I have also tried the roaming installation based on the zip file version of PyScripter. My goal is to get PyScripter using the same python that QGIS dev is using. I have no idea why the command line options fail. I am using Win7 x64 and my QGIS install is in C:\OSGeo4W\dev.

I suspect that version creep has made the existing instructions obsolete. Any help in getting PyScripter able use qgis' python and to recognise qgis' classes would be very much appreciated. Any set up instructions for an alternative IDE would also be welcome.


  • 1
    Can I suggest Aptana Studio. I found it better to setup and more stable then PyScripter – Nathan W Jul 31 '13 at 5:07
  • 1
    If you do want to try Aptana Studio I have added setup notes here gis.stackexchange.com/a/62334/97 – Nathan W Jul 31 '13 at 5:09
  • I have not found any method of importing python libararies into PyScripter and there appears to be no way of permanently providing paths to py files in project directories. PyScripter does provide a clean way of viewing the methods and attributes of classes which I really like and it is really fast. However, I have followed Nathan W's instructions and got Aptana running, with code completion. – AndrewM Aug 1 '13 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.