Re: Specific Python 2.x version per project?

Todd Whiteman <[email protected]> Wed, 16 Mar 2011 10:09:29 -0700
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
On 11-03-14 01:54 PM, Michael Geary wrote:
> Is there a way to select a specific Python 2.x installation for an
> individual project or source file in Komodo IDE 6.1.1? (Per project
> would be good enough.)
>
> I thought there used to be a project setting along these lines in
> previous versions, but I could be remembering wrong.
>
> My various projects use different Python versions: Google App Engine
> requires 2.5.x, but I use 2.6.x or 2.7.x for other projects. I'm
> currently changing the Python version globally in Edit/Preferences when
> I switch between App Engine and other projects, so looking for a way to
> automate this.

Hi Mike,

Currently Komodo 6 (and earlier) uses just one global preference for the 
Python interpreter - there are no per-project interpreter preferences.

We've got the following enhancement request on this - to add project 
interpreter settings:
http://bugs.activestate.com/show_bug.cgi?id=84957

One workaround that you can use, is to use a Komodo macro to quickly 
change the Python interpreter preference - saves having to open the 
Komodo preferences page:

     var prefs = 
Components.classes['@activestate.com/koPrefService;1'].getService(Components.interfaces.koIPrefService).prefs;
     prefs.setStringPref("pythonDefaultInterpreter", 
"/usr/local/bin/python2.6");

Note: Some of the other interpreter names are:
   perlDefaultInterpreter
   python3DefaultInterpreter
   phpDefaultInterpreter
   rubyDefaultInterpreter
   xsltDefaultInterpreter

Cheers,
Todd
_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss