🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Calling a Python Script from TCL Script

User: "Thirukumaran"
Altair Community Member

Hello all,

I have been trying to call a python script located in a directory with Tcl exec command in HyperWorks 2023 which doesn't give me the desired execution. How can I call another .py script from .tcl script file?

Kindly give out some ways to work this out.

Thanks in advance,

Thirukumaran

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Akash Purushothaman"
    Altair Community Member

    Hi Thirukumaran,

    I just used the below lines for execution and it works for me in HM2023.1


    set pyPath {/path/to/python}

    set scriptPath {/path/to/your/script.py}

    set result [exec $pyPath $scriptPath]

    puts "Output from Python script: $result"

    Here I have not passed any args, but you can also add args based on your need

    Best Regards,
    Akash P