VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: python icons-SOLVED  (Read 1801 times)

brock

  • Member
  • *
  • Posts: 26
python icons-SOLVED
« 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.....
« Last Edit: April 02, 2008, 09:37:51 pm by brock »
Logged
ChemBook Laptop (it was free) 1.50 GHz 1 gig ram 1024x768 screen Ethernet-cable modem (working on wireless), Vector 5.9 Standard Gold, HD install, NO dual boot--windowsfree system!  prefer Xfce for now

bigpaws

  • Vectorian
  • ****
  • Posts: 1869
Re: python icons
« Reply #1 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
Logged

lagagnon

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1922
Re: python icons
« Reply #2 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).
Logged
"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll

brock

  • Member
  • *
  • Posts: 26
Re: python icons
« Reply #3 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.
Logged
ChemBook Laptop (it was free) 1.50 GHz 1 gig ram 1024x768 screen Ethernet-cable modem (working on wireless), Vector 5.9 Standard Gold, HD install, NO dual boot--windowsfree system!  prefer Xfce for now