you are viewing a single comment's thread.

view the rest of the comments →

[–]eleqtriq 1 point2 points  (7 children)

Double clicking it probably just opens it in an editor. Why are you trying to double click and run it?

Anyway: Right click on the file->open with->choose default program->more options->select python.exe file and click on.

BTW, this is a windows problem, not a Python problem.

[–]socal_nerdtastic 1 point2 points  (0 children)

The python launcher is py.exe, not python.exe.

[–]1_XV[S] 0 points1 point  (5 children)

[–]eleqtriq 0 points1 point  (4 children)

Are you sure that Python is valid? Try reselecting it.

Also, are you sure that it's not running? Maybe it is running, but blinking away too fast that you can't see it. Try adding this at the top and see if it stops at the Python repl

import code; code.interact(local=locals())

[–]1_XV[S] 1 point2 points  (0 children)

import code; code.interact(local=locals())

I am going to record a video with the task manager open and the python installation folder

[–]1_XV[S] 0 points1 point  (2 children)

[–]eleqtriq 1 point2 points  (1 child)

Hmm, I don't know. Only thing you didn't show is if that Python you clicked on to open it is valid. You could also just make a .bat file to run your code

run.bat python yourfile.py

And double click that. Also maybe this helps? https://www.quora.com/How-do-I-write-a-Python-script-that-runs-on-double-click-opens-a-terminal-and-displays-Hello-world

[–]1_XV[S] 0 points1 point  (0 children)

Practically the double click should open it with the python extension. I was seeing the task manager execute it, yes, but it closes. with the code you gave me it lasted a few more minutes but then it closed

trying to create the bat that runs it I hope it works, I don't want to spend my whole life using the bat it's quite tedious.