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: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭

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

  • sombodyfromtheworld
    sombodyfromtheworld Member Posts: 32
    10 Comments First Anniversary Name Dropper
    **
  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 367
    25 Answers 100 Comments Second Anniversary 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: 32
    10 Comments First Anniversary 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