Run python file through a command line window in workbench

I need to run a python file using ironpython command promt from workbench. I know I can use "Run Script File..." command but then I can't see the progress. Maybe is there another way to see the progress (for instance python "print" function) of the script.


  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 732
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member

    You can use the ACT console, run your file there, and use printing commands to check on the progress.

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 240
    First Anniversary First Comment 5 Likes Ansys Employee

    @sombodyfromtheworld ,
    I also like to create small external logging functions to write statements to a simple text file. This allows you to see the statements as they are happening in the code vs. all being printed at the end of the execution. This is obviously helpful when code runs for a length of time, or in cases where code may cause a crash and you want to debug.

  • sombodyfromtheworld
    sombodyfromtheworld Member Posts: 26
    First Comment Name Dropper
    edited December 2023

    @Mike.Thompson yes I also thought about it to append info to txt file just to see what is happening in the code and not be blind