468,505 Members | 1,728 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

Python Script Click to run

Well, I know there are many querries on this topic and I tried the suggestions posted but still it does not works for me so I am starting a thread here. I also tried on the Python forums but some of them suggest asking Ubuntu community and vise-a-versa !

I am learning Python programming and make some simple games but I wish if I can run those .py files just by clicking (or double clicking) on its icon on the desktop.
I have added #!/usr/bin/python in my script and made it executable from the properties dialogue box but still when I click on it I get the "Run in Terminal, Display, Cancel, Run" dialogue box.

When I use the "Run in terminal" or "Run" button, nothing happens. When I type in terminal filename.py, it says command not found, even if I can see the file there and the terminal path is correct. If i use python filename.py instead of that then it works fine.

But always working through the terminal makes it less enjoyable, esp if it is a game. Just for info, I use PyGame graphics libraries for the games in Python.

Can any one advise.
Mar 5 '19 #1
0 941

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Andrew Chalk | last post: by
6 posts views Thread by tatamata | last post: by
7 posts views Thread by hlubenow | last post: by
1 post views Thread by michael.buonomo | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.