tutoteket.no is one of the many independent Mastodon servers you can use to participate in the fediverse.
Tutoteket er ein liten server med liten plass, men vi har lesestoff og god drikke, så vi klarar oss.

Administered by:

Server stats:

7
active users

Could someone please give me the simplest possible step-by-step on how to run a python script on Windows?

Is it just installing Windows installer (64-bit) from python.org/downloads/windows/ and then double clicking the .py file? Or is there some other steps?

Python.orgPython Releases for WindowsThe official home of the Python Programming Language

@forteller Unfortunately I can't give an authoritative answer because I don't use Windows, but from a bit of quick research it sounds like there are a couple more steps, at least for the first time you want to run a .py file:

1. download the Python installer
2. *run* the installer
3. right-click on your .py file, choose "Open With", choose Python (or python.exe or whatever it shows up as) and select "Always use this program for this file type" if that's an option
4. then you can double-click the .py file

But steps 1-3 only need to happen once. So in the future, if you want to run any more Python scripts, you should be able to just double-click them.

Whether the script actually does anything useful when run in this way is a whole separate matter, of course....

Info taken from e.g. learnpython.com/blog/run-pytho and stackoverflow.com/a/1934695/56

LearnPython.comHow to Run a Python Script in WindowsIf you’re writing your Python scripts in Windows, you’ll need to know the best ways to run them. We’ve got you covered with this article.
Børge

@diazona Great, that sounds like something I can teach people to do. I don't use Windows either, and had issues figuring out trough searches. Thanks a lot! :)

@forteller Happy to help! But I hope you can get a proper response from someone experienced with using Python on Windows and not have to rely on my flaky research 😛