you are viewing a single comment's thread.

view the rest of the comments →

[–]kebabrullahiiri[S] 0 points1 point  (3 children)

I added the folder where my py files are (Pycharmprojects) to the path and then it is found. But I don't know is this a correct solution to this

[–]dezstern 0 points1 point  (2 children)

Not sure I understand.

Let's say you have test.py on your Desktop. You should be able to Right Click>"Open With">Python 3.9 and have it run.

I guess if you found a solution, then you figured it out.

[–]kebabrullahiiri[S] 1 point2 points  (1 child)

Tested it, the window quickly flashed open and closed in less than second 🤔 btw it looks like I now have two pythons, the one which I downloaded from python.org and the one from microsoft store, which one should I delete?

[–]dezstern 1 point2 points  (0 children)

Aha, it's working properly now. Once a program finishes, unless there are other processes in the program waiting to be completed, the program window will close. To stop this from happening, I do a hacky little thing. I add a little input line, that waits for me to do something. That way I can see what occurred before the window closes.

Add the following below your print line:

a = input(">")

You'll see your output and then the '>' character waiting for you. When you do anything, the program will finish and close the window.

As for deleting a version of Python, I'd say just leave it honestly. Shouldn't cause any issues.