如何导入这个python文件,并执行它?
怪我咯
怪我咯 2017-04-17 17:40:26
0
3
339

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
黄舟

First of all, your command status is wrong. If you want to run this py file, enter: python script1.py,而不是在命令窗口输入python之后进入python运行环境。
需要注意的是,命令行窗口和运行的文件要在同一文件夹下,或者,命令行通过cd命令要进入该文件的文件夹下。当然,你也可以在该文件的文件夹下,按住shift,右击空白处,就会有在此文件夹下打开命令窗口 in the command line window.

PS: I need to read some basic books :)

巴扎黑

You are teasing me, what you said on the first floor is good

黄舟

First of all, what you wrote is not a module, and importing it is useless. To import a module, you have to use import [xx]
Secondly, you don’t have to do that to execute the script. You don’t need to enter the cli, just python [name.py].

Read More

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template