Note: this wiki is no longer maintained. If you have any questions related to this wiki, please post them on the CrunchBang forums.

Translations of this page?:

VARIOUS: Python 3 as Geany default

Step 1. After installing geany you want to go into the terminal and enter this:

sudo <text editor here> /usr/share/geany/filetypes.python

Doing so will ask for your password and subsequently bring you to a text file for geany's python settings.

Step 2. Go to the bottom of the file and comment out the bottom two lines - Just add a # in front of them, this means if you want to go back the the 2.x compiler you can do so by following these instructions again.

Step 3. Now copy paste the following two lines into the bottom of the document:

compiler=python3 -c "import py_compile; py_compile.compile('%f')"
run_cmd=python3 "%f"

Step 4. After you save it the next time you open your python3 script in Geany you will be able to run (f5) and use it as python3 (Assuming that is what you code in)

Job done!

Reversing these changes

To revert back to 2.x, all you do is go to that file again and un-comment the lines regarding 2.x and comment out the 3.x lines.

howto/python3_as_geany_default.txt · Last modified: 2012/09/04 08:56 by corenominal
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported

Powered by DokuWiki. Hosted by Linode.
Copyright © 2010 CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.