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.

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 859
    500 Comments Photogenic Name Dropper 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.

  • sombodyfromtheworld
    sombodyfromtheworld Member Posts: 29
    10 Comments Name Dropper
    **
  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 327
    25 Answers First Anniversary 100 Comments 25 Likes
    ✭✭✭✭

    @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: 29
    10 Comments 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