Skip to main content

How to get status of practice script over pyrcl - Community / Test Automation - Lauterbach Support


How to get status of practice script over pyrcl Awaiting Agent

I am trying to get the status of a PRACTICE-script over the python-api.
For example:
dbg.cmd("DO ~~/demo/tricore/flash/tc39x.cmm CPU=TC397X PREPAREONLY")
The script take a few seconds to execute and I would like to poll the status and wait until the script is finished before next step.

Comments (3)

Wiem Wala Benayed
You need to use cmm instead of cmd
dbg.cmm("DO ~~/demo/tricore/flash/tc39x.cmm CPU=TC397X PREPAREONLY")
Andreas Wikerstal
thank you. It worked fine using the timeout feature (timeout: None) to wait to complete execution.
Can you also query the return status e.g. if the script breaks?
Where can I read-up on return status on running practice-scripts over the python-API?
Wiem Wala Benayed
You can use a global macro:

You need to add in your PRACTICE script:


Then you can read the value in Python:

foo = dbg.practice.get_macro("&foo")

Add a comment

To prove you are a human, please tell us the text you see in the CAPTCHA image