by Dragos, on January 14th, 2009  
Recently i have switched to Ubuntu (i just wanted to try it, but after i have tried it i didn't want to go back to windows ;)), so i needed a good IDE to work with Python 3.0 . I found Geany a perfect IDE having all the features i want, but when i tried to execute my scripts with Geany i noticed it was using the default version of python in Ubuntu v2.5.2 . Well, i wanted Python 3.0 to execute my files not Python 2.5.2 . I've searched the internet, but i couldn't find out a solution. I've dugg into Geany folder and opened the file filetypes.python and i found everything i was looking for ;)

So to make Geany execute your files with python 3.0 you have to:

  1. Open a terminal

  2. Go to your templates folder of Geany. In my case it was /usr/local/share/geany. So the command is cd /usr/local/share/geany/

  3. Open filetypes.python with super user privileges. sudo gedit filetypes.python

  4. Scroll down to the bottom of the file. Change the last two lines to

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

  6. Restart Geany if open

  7. Test your version with the following lines of  code:

  8. import sys

  9. print(sys.version)

  10. It should print Python 3.0 ...


That's all. You're now working with Geany+Python 3.0

Thanks to NoBugs! from ubuntuforus