Jump to content
  • 0

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


venkatap

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

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...