Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Python script without opening Pythonwin

Tags:

python

I have a python script which I can run from pythonwin on which I give the arguments. Is it possible to automate this so that when I just click on the *.py file, I don't see the script and it asks for the path in a dos window?

like image 407
user150674 Avatar asked Mar 18 '26 08:03

user150674


1 Answers

You're running on Windows, so you need an association between .py files and some binary to run them. Have a look at this post.

When you run "assoc .py", do you get Python.File? When you run "ftype Python.File", what do you get? If "ftype Python.File" points at some python.exe, your python script should run without any prompting.

like image 175
hughdbrown Avatar answered Mar 21 '26 00:03

hughdbrown



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!