## Changing the Console's version of Python

### Changing the Console's version of Python

I noticed that the console in sublime is using a zip of python 2.6
How do I change it so the console uses a different version of python like Python 3.2.2?
Daftatt

Posts: 25
Joined: Tue Nov 29, 2011 2:28 am

### Re: Changing the Console's version of Python

This can't be changed, it's an integral part of the editor.
jps

Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

### Re: Changing the Console's version of Python

Hmmm... Well then how about a simple way to press a button and run the code in sublime text in the python.exe that is in the windows path variables? Which for me is the 3.X version.
Daftatt

Posts: 25
Joined: Tue Nov 29, 2011 2:28 am

### Re: Changing the Console's version of Python

The default build system for Python should do that for you. Make sure it's the selected build system and press F7. If you want to *see* the actual console, you will need to create your own build system, though, and use that instead.

http://sublimetext.info/docs/en/core/build_systems.html
guillermooo

Posts: 723
Joined: Thu Jul 23, 2009 9:06 am

### Re: Changing the Console's version of Python

Thanks, I think I'll do the latter
Daftatt

Posts: 25
Joined: Tue Nov 29, 2011 2:28 am

### Re: Changing the Console's version of Python

An quick option:

pythonc.bat
Code: Select all
start cmd /c "python.exe -u %1 && pause"

Python Console Build System.sublime-build
Code: Select all
{   "cmd": ["C:\\users\\<YOU>\\path\\to\\pythonc.bat", "\$file"]}

It isn't perfect, but it's simpler than writing a custom build command...
guillermooo

Posts: 723
Joined: Thu Jul 23, 2009 9:06 am

### Re: Changing the Console's version of Python

It's worth noting, however, that you'll lose the ability to navigate errors with F4, because you aren't capturing any error info.
guillermooo

Posts: 723
Joined: Thu Jul 23, 2009 9:06 am

### Re: Changing the Console's version of Python

you can just do jerryrigging debugging, and by that I mean taking a screenshot before the cmd closes and viewing the error in paint
Daftatt

Posts: 25
Joined: Tue Nov 29, 2011 2:28 am

### Re: Changing the Console's version of Python

Haha... I've done that!
guillermooo

Posts: 723
Joined: Thu Jul 23, 2009 9:06 am