• 0

Executing External File


Go to solution Solved by attila,

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 post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  • Solution

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.

Edited by attila
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now