Unable to open PYTHON scripts on MINT 13?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Unable to open PYTHON scripts on MINT 13?

Postby JaZZyCooL on Thu Dec 06, 2012 5:41 pm

hello guys,
I just installed my linux mint 13 and made my first python program on mint, but I am unable to open python scripts. I don't know why? I tried each and every possible way but still unable to open the stuff. Can you guys help me out solve the problem.?

I tried "./python.py" also added directory to the python console and also to the linux terminal but still unable to open up.
JaZZyCooL
Level 2
Level 2
 
Posts: 55
Joined: Thu Dec 06, 2012 5:37 pm

Linux Mint is funded by ads and donations.
 

Re: Unable to open PYTHON scripts on MINT 13?

Postby overthetop on Thu Dec 06, 2012 5:56 pm

Are you trying to view/edit the file or run it?
Image
"A wise man can learn more from a foolish question than a fool can learn from a wise answer." -- Bruce Lee
User avatar
overthetop
Level 4
Level 4
 
Posts: 368
Joined: Thu Oct 06, 2011 10:25 am
Location: /home/overthetop

Re: Unable to open PYTHON scripts on MINT 13?

Postby JaZZyCooL on Sat Dec 08, 2012 2:52 am

No I am trying to run the file.
JaZZyCooL
Level 2
Level 2
 
Posts: 55
Joined: Thu Dec 06, 2012 5:37 pm

Re: Unable to open PYTHON scripts on MINT 13?

Postby overthetop on Tue Dec 11, 2012 3:11 pm

Sorry it took so long to get back to you.

What output is the terminal giving you?

Open the terminal in the directory containing your python script and run the following:
Code: Select all
python filename

Be sure to replace filename with the name of your script file.

You can also run your script like this:
Code: Select all
./filename

if you add the line #!/usr/bin/env python to the top of your python file and then make it executable(see this on how to make a file executable).
Image
"A wise man can learn more from a foolish question than a fool can learn from a wise answer." -- Bruce Lee
User avatar
overthetop
Level 4
Level 4
 
Posts: 368
Joined: Thu Oct 06, 2011 10:25 am
Location: /home/overthetop


Return to Other topics

Who is online

Users browsing this forum: hero92, Yahoo [Bot] and 9 guests