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 how to get help
JaZZyCooL
Level 1
Level 1
Posts: 49
Joined: Thu Dec 06, 2012 5:37 pm

Unable to open PYTHON scripts on MINT 13?

Postby JaZZyCooL » 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.

User avatar
overthetop
Level 4
Level 4
Posts: 366
Joined: Thu Oct 06, 2011 10:25 am
Location: /home/overthetop

Re: Unable to open PYTHON scripts on MINT 13?

Postby overthetop » 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

JaZZyCooL
Level 1
Level 1
Posts: 49
Joined: Thu Dec 06, 2012 5:37 pm

Re: Unable to open PYTHON scripts on MINT 13?

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

No I am trying to run the file.

User avatar
overthetop
Level 4
Level 4
Posts: 366
Joined: Thu Oct 06, 2011 10:25 am
Location: /home/overthetop

Re: Unable to open PYTHON scripts on MINT 13?

Postby overthetop » 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


Return to “Other topics”

Who is online

Users browsing this forum: No registered users and 1 guest