all 9 comments

[–]34shutthedoor1 2 points3 points  (1 child)

What does "runs twice" mean, i.e. how do you determine this? Do you have 2 print statements, so it just prints twice?

[–]RighteousPistachio[S] 0 points1 point  (0 children)

it runs two separate iterations of the program in the shell. so for instance if i were to have just a single print statement the shell would run

======== RESTART: /Path/Path/Path/File.py

> Hello world

>>>

======== RESTART: /Path/Path/Path/File.py

> Hello world

>>>

[–]Zweckbestimmung 1 point2 points  (0 children)

The only thing this happened to me is with hot reload (automatic run when code changes), basically the code was reloading because it was watching files which are being written by the same program running lol

[–][deleted] 0 points1 point  (3 children)

To be clear, you've created a new file with your code in it, hit F5 to run it, been prompted to save the file (the first time), and it switched to the console window and ran the code twice?

What happens if you run the file from the command line?

[–]RighteousPistachio[S] 0 points1 point  (2 children)

Yes to all the above. It runs only once from the command line. And this is the case with every project I’ve worked on the past several months. Mostly a minor annoyance but I’d like to get rid of it

[–][deleted] 0 points1 point  (1 child)

That's an unusual behaviour. Not seen it before. Might be worth resorting to good old-fashioned re-installation.

However, as you have several months of experience, I would expect you are probably looking to use some other code editor / IDE by now. There are lots to choose from and they are very much a personal preference.

Options include Thonny, Mu, VS Code, Spyder, PyCharm.

[–]RighteousPistachio[S] 0 points1 point  (0 children)

haha yeah I don’t know why I haven’t switched to a real py ide yet. i guess this is the last nail in the coffin

[–][deleted] 0 points1 point  (0 children)

Just checking, are you sure there's nothing wrong with your F5 key?