[英]How do I save and run a script I've altered in Pycharm?
I'm trying to learn some basics from an online course here so bear with me please?我正在尝试从这里的在线课程中学习一些基础知识,所以请多多包涵?
I have an example script which i ran and this error;我有一个我运行的示例脚本和这个错误;
the following arguments are required: source_ip, destination_ip需要以下 arguments:source_ip、destination_ip
In my unknowing brain it means i need to actually add the ip addresses yes?在我不知情的大脑中,这意味着我需要实际添加 ip 地址是吗? It's kind of irrelevant really if I'm wrong I'm more interested in how I alter an existing script through Pycharm save it as a different name, then run that that script in my terminal which is gitbash?如果我错了,这真的有点无关紧要我更感兴趣的是如何通过 Pycharm 更改现有脚本,将其保存为不同的名称,然后在我的终端中运行该脚本,即 gitbash?
So I opened the script in Pycharm and added the ip addresses.所以我在 Pycharm 中打开脚本并添加了 ip 地址。 How do I save that script as a different name and then run it through pycharm?如何将该脚本另存为其他名称,然后通过 pycharm 运行它?
If you select Run
, Edit Configurations...
on Pycharm top menu, you will see a screen to define the arguments used when you run your python script: If you select Run
, Edit Configurations...
on Pycharm top menu, you will see a screen to define the arguments used when you run your python script: In the Parameters
box you can enter the actual values of the parameters you want to use.在“ Parameters
”框中,您可以输入要使用的参数的实际值。 I entered names in the example, but you should see the actual parameters values you would pass to the function from the command prompt.我在示例中输入了名称,但您应该会看到从命令提示符传递给 function 的实际参数值。 That will pass the configured parameters to your script every time you run it in Pycharm.每次您在 Pycharm 中运行它时,都会将配置的参数传递给您的脚本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.