VectorLinux

The nuts and bolts => Software General => Topic started by: brock on April 01, 2008, 09:46:00 pm

Title: python icons-SOLVED
Post by: brock on April 01, 2008, 09:46:00 pm
So I'm learning Python.  I need to save files and be able to double-click on the icon to activate the file, thereby activating the program.  But when I click on the "xxxxx.py" icon, it gets opened with mousepad.  What gives?  I'm sure it's just a little box not clicked or whatever but.....
Title: Re: python icons
Post by: bigpaws on April 02, 2008, 04:47:16 am
In the console use ls -la <file name> to make sure that what you
have is executable. If it is not then you can chmod +x <file name>

Bigpaws
Title: Re: python icons
Post by: lagagnon on April 02, 2008, 07:09:56 am
In whatever file manager you happpen to be using you need to find the options to change the association of the suffix .py to "python nameoffile.py". If those are text only python programs and you want to see the ouput in a shell then the association would be:
xterm -e python

(or whatever terminal you wish to use substitute xterm).
Title: Re: python icons
Post by: brock on April 02, 2008, 09:37:19 pm
Great!  I added xterm -e python to the command to open the file and it works perfectly.  Thanks again.