简体   繁体   English

从命令行运行 python 脚本时,PythonWin 也会运行。 我怎样才能避免这种情况?

[英]When running a python script from command line, PythonWin also runs. How can I avoid this?

I'm trying to run a script from the command line (command prompt).我正在尝试从命令行(命令提示符)运行脚本。 I type:我输入:

python.exe full_script_path.py parameters

And for some reason, PythonWin opens up.出于某种原因,PythonWin 打开了。 I have to close it for execution to finish.我必须关闭它才能完成执行。 Unfortunately, this keeps me from being able to do multiple executions in a batch file.不幸的是,这使我无法在批处理文件中执行多次执行。

What can I do to avoid PythonWin from opening?我该怎么做才能避免 PythonWin 打开?

I think you should launch pythonw.exe instead of plain python.exe , but I am not on a windows box right now, so I cannot test it.我认为您应该启动pythonw.exe而不是普通的python.exe ,但我现在不在 windows 盒子上,所以我无法测试它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我处理也可以从命令行解析的模块的默认参数时,如何避免冗余? - How can I avoid redundancy when I handle default arguments to modules that may also be parsed from the command line? 从命令行运行时,在pycharm中运行的python脚本有内存分配错误 - python script that runs in pycharm has memory allocation error when running from command line 如何为从批处理文件运行的python脚本传递变量命令行参数? - How do I pass variable command line arguments for a python script, that runs from a batch file? 如何从Python脚本启动GIMP命令行? - How can i launch the GIMP command line from a Python script? 我如何使用 python 脚本中的命令行 - How can i use command line from python script Python脚本,每次运行时都会在序列中输入下一个数字。 - Python script to input the next number in a sequence every time it runs. 从命令行运行 python 脚本时,import 语句不起作用 - import statement is not working when running python script from the command line 如何在Windows命令行中使运行python的命令成为脚本? - How to make a command that runs python a script in Windows command line? 在Windows中从命令行运行python脚本 - Running a python script from the command line in Windows 从 python 命令行运行脚本 - Running script from python command line
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM