Pages

Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Wednesday, June 6, 2012

How to get geany to use python3 as its default


How to get Geany to use Python 3 by as the python version 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 # infront of them)

Step 3.)
Now copy paste the following two lines into the bottom of the doccument:
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 python script in Geany you will be able to run (f5)
and use it as python3 (Assuming that is what you code in)


Cheers!