Home Download Buy Blog Forum Support

python development: key binding to execute current script

python development: key binding to execute current script

Postby oats on Mon Jan 31, 2011 6:22 pm

Hi-
I'm doing just a bit of python coding lately, and I want to map the F5 function key to execute the current file. (I think this would just run execfile(current_file) in the python interpreter). Can someone please help me set this up?
Thanks
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: python development: key binding to execute current script

Postby guillermooo on Mon Jan 31, 2011 8:57 pm

You probably want to use build systems:

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

Sublime 2 ships with one for Python: go to Tools | Build System, check Python, press F7.

G
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: python development: key binding to execute current script

Postby oats on Mon Jan 31, 2011 10:27 pm

That didn't exactly work for me. I think I'd like to understand the key bindings and API approach anyway, for future reference.
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 28 guests