473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1176

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

Similar topics

7
by: Andrew Chalk | last post by:
Is this possible? In my CGI app. I display a web page with a link (anchor). When the link is clicked I want to exectute a python script rather than go to an HTML page. Many thanks.
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
7
by: hlubenow | last post by:
Hi, recently there was a thread about hiding the python-script from the user. The OP could use http://freshmeat.net/projects/pyobfuscate/ H.
1
by: michael.buonomo | last post by:
We have been using the Google recommended python script for about a year. We recently realized that the script was not crawling our sites url's, but just our folders which reside on the server. The...
3
by: telduivel | last post by:
Can someone please help me with this: I have a python script, that at some point calls a linux bash script (.sh). Starting the shell script is the last thing my python script needs to do, so I...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
0
by: norseman | last post by:
Gros Bedo wrote: ============================== Yes. man ps explains try ps -AFL | grep then kill -9 found (check it more than twice) 1) If your script is known to hang use what...
2
by: maximus tee | last post by:
hi, initially i was running on Python 25 and when i double click a python script, it will launch the CMD DOS window. After that i installed Python 31, now my script whenever i double click it, it...
1
by: Erik Anderson | last post by:
Hey I am trying to get the hang of both Python and Selenium RC at the same time and having a bit of difficulty and was wondering if anyone here could assist me validating my Python Script. I've...
2
by: Sean Asemani | last post by:
Hello All I am new to python and using python 2.6 for few weeks with no problem. I like notepad++ and trying to run pythons script in notepad++. In notepadd++, Run menu > Run dialog box I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.