Jump to content
  • 0

Executing External File


Nick

Question

Hi Everyone!

I'm currently working on an automated tester and instead of having someone write commands on a terminal emulator (Tera Term) I'd like to run a python script to do so.

I've looked through the reference material and the "File()" commands are only used to read or write to texts files. Are these other commands you recommend I can use to execute the python script from my WaveForms 2015 script?

Best Regards,

Nick

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi @Nick

You can use the Tool.start(program, argument array, work directory) function to run external programs. This function returns immediately, it does not wait for the external program to finish.

Tool.start("C:/PFiles/WinPython-32bit-2.7.6.2/python-2.7.6/python.exe", ["test.py"], "C:/temp/")

Note, a device can be used by one application at a time. You won't be able to open the same device with Python script as the one is used from the WF application.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...