up vote 0 down vote favorite
1
share [g+] share [fb]

Let's say I have a Python script sitting in a folder I just opened with the graphical file manager in standard Ubuntu. What would be the quickest way to run it?

link|improve this question

73% accept rate
feedback

3 Answers

up vote 0 down vote accepted

Maybe "properties -> set executable [x] ?

while struggling with how to import JVC's weird .mod format to standard .mpeg...

link|improve this answer
feedback

mark it as executable first,ensure you have python installed,then double click on it

you can mark files executable with the following command

chmod a+x filename

where filename here is the name of the file you want to make executable

link|improve this answer
1  
Also, make sure that the script has the hash-bang line at the beginning (like #!/usr/bin/env python): en.wikipedia.org/wiki/Hash-bang – Jukka Matilainen Aug 28 '09 at 6:10
That's very inefficient. If Linux is supposed to be an efficient OS designed for developers by developers, I expect it should be easy to immediately run a Python script, without adding any hash-bang or touching the shell. Is there any faster way? – Ram Rachum Aug 28 '09 at 7:31
1  
well,the permissions also matter,you don't want unauthorized users running your script,do you? – Mahmoud Hossam Aug 28 '09 at 17:24
Whatever the reason, this is ridiculous. – Ram Rachum Aug 28 '09 at 20:18
maybe you think it is,but security is a main concern in all Unix-Like operating systems like Linux,and that's what makes it better for servers than windows and other OSes – Mahmoud Hossam Aug 28 '09 at 20:53
feedback

I'll probably be showing my utter ignorance here, but perhaps double clicking on it?

link|improve this answer
That will just open it in a text editor or whatever aplication is set to open .py files – Philippe Mongeau Aug 28 '09 at 3:01
Like I said, utter ignorance... – tnorthcutt Aug 28 '09 at 14:12
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.