Daily Linux News.

How to Get Python Build Results in Terminal with Sublime Text 2

Sublime Text 2 is a powerful text editor for Linux that comes with lots of plugins and customization options.

The text editor is pretty good, however, one thing I don't like about it is that build/execute results are shown in its native console rather than system default shell like gnome-terminal. 

This problem can be easily solved by creating a new build file and adding following to it:

"cmd": ["gnome-terminal -e \"python $file\""],
"shell": true

Note that using this this method, gnome-terminal will be closed when the process is terminated. If you like a Geany like approach where terminal stays open for reviewing results, we can do the same using Geany's run script.

Create a new bash script with following in it:


python $1

echo "

(program exited with code: $?)"

echo "Press return to continue"
read dummy_var

Now create new sublime build file with following in it:

"cmd": ["gnome-terminal -e \"/your/run/script.sh $file\""],
"shell": true

Replace path of your own run script in above command. Make sure your script has executable permissions.

Lastly, Sublime Text's build console will still popup at the bottom. To disable it for build results, add this to your user settings file:

"show_panel_on_build": false


Post a Comment

About Ubuntu Vibes

Ubuntu Vibes is a blog that brings latest news, tips and tricks about Linux, Ubuntu & Open Source Software. The blog covers desktop & netbook editions and different desktop environments like GNOME & KDE.

Follow Us !!

Twitter Button from twitbuttons.comFollow on FacebookSubscribe to me on YouTubeSubscribe to RSS

Add us on Google Plus !!

Like Us on Facebook