How to run python script in Slicer?

Operating system:Win10
Slicer version:4.11.0(2020.6.15)
Expected behavior:The saveLabel.py should be run when I run C:\ProgramData\NA-MIC\Slicer 4.11.0-2020-06-15>Slicer.exe --python--script C:\Users\310091560\Desktop\saveLabel.py in the command line window.
Actual behavior: nothing happened except the Slicer main window(python interactor) openning.

Is this command line C:\ProgramData\NA-MIC\Slicer 4.11.0-2020-06-15>Slicer.exe --python--script C:\Users\310091560\Desktop\saveLabel.py right to run a python script?
Thanks in advance.

BTW, is the tutorial “[https://www.slicer.org/wiki/Documentation/Nightly/Extensions/DebuggingTools](http://Visual Python debugging in PyCharm)” updated according to the 4.11 version? I cannot find the Python debugger extension and the “Python debugger” module (in “Developer Tools” category).
Thanks again.

The correct argument name is --python-script and not --python--script.

So simple mistake, I should be more careful. Thanks a lot.

1 Like