简体   繁体   English

从命令行停止 Abaqus 中正在运行的 Python 脚本

[英]Stop a running Python script in Abaqus from a command line

I am trying to stop a running Python script in Abaqus from the outside.我试图从外部停止在 Abaqus 中运行的 Python 脚本。 I know that there is a button in the CAE GUI to stop a script, but what if I run the script with noGUI from a command line like this:我知道 CAE GUI 中有一个按钮可以停止脚本,但是如果我从这样的命令行使用 noGUI 运行脚本怎么办:

abaqus cae noGUI='script.py'

Is there a possibility to stop this script from running?有没有可能阻止这个脚本运行? Maybe I could cancel the Python-process in the background with some command?也许我可以用一些命令在后台取消 Python 进程?

Thanks for your help, Fel谢谢你的帮助,费尔

You can quit any process by killing it from the command line.您可以通过从命令行中止任何进程来退出它。 Here is an example with python where we kill all processes with python in the name.这是一个使用 python 的示例,其中我们杀死了名称中带有 python 的所有进程。

killall -9 python

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM