I have a question about Python .py file.

Asked 1 years ago, Updated 1 years ago, 127 views

1. Python.If you run the py file like this and enter a value, it turns off immediately, so how can I solve this?

python py2exe

2022-09-21 11:08

1 Answers

When you run a program, rather than clicking on the Python source code file, at the command prompt

python [file name]py]

We recommend that you run it as .

import os
os.system("pause")

There is also a way to add the above code at the end of the source code.


2022-09-21 11:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.