• 0
venkatap

Using Tool.Start to run Python from Waveforms (Mac)

Question

Hi,

I have been using the Waveforms in Mac to control digital discovery. And I am now familiar with using the scripts in Waveforms.

I want to use Tool.start option to run python from Waveforms. Below is the command I am using based on the format. But I haven't been successful with running python.

Tool.start("/Users/venkatap/anaconda2/bin/python", "/Users/venkatap/Waveforms_v1/py_files/run_file.py","/tmp/")

As all the examples and discussions about this topic are related to windows machine, I wanted to know how to use the Tool.start option in Mac. Kindly assist me with this.

Thank you,

Praveen

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @venkatap

The second argument in Tool.start() and .exec() should be array ( [arg1, arg2] ) of parameters to pass for the external app.
Try:
Tool.start("/Users/venkatap/anaconda2/bin/python", ["/Users/venkatap/Waveforms_v1/py_files/run_file.py"], "/tmp/")

Note that a device can be opened by one application at a time. Having a device opened from WF app you won't be able to open it at the same time from python.

Share this post


Link to post
Share on other sites
  • 0

Hi Attila,

Even with the second parameter as an array I do not see python starting up. I have no other applications open.

The purpose is to write a python file in waveform script to control GPIB, then run python through waveform's Tool.start. And then start acquiring data from the logic analyzer.  

Alternately I plan to try running python on its own to control GPIB and wait, then have waveforms acquire data and wait. Then repeat this process. Not sure how the timing between two  applications will work out yet. Kindly let me know if you have any suggestions.

 

Thank you,

Praveen

Share this post


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