Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
en:python-ivi:readme [2014/02/12 20:27] alex [Included drivers] |
en:python-ivi:readme [2014/02/12 20:28] (current) alex [Usage example] |
||
---|---|---|---|
Line 126: | Line 126: | ||
# measure phase | # measure phase | ||
phase = mso.channels['channel1'].measurement.fetch_waveform_measurement("phase", "channel2") | phase = mso.channels['channel1'].measurement.fetch_waveform_measurement("phase", "channel2") | ||
+ | # save screenshot to file | ||
+ | png = mso.display.fetch_screenshot() | ||
+ | with open('screenshot.png', 'wb') as f: | ||
+ | f.write(png) | ||
+ | # save setup to file | ||
+ | setup = mso.system.fetch_setup() | ||
+ | with open('setup.dat', 'wb') as f: | ||
+ | f.write(setup) | ||
+ | # restore setup from file | ||
+ | with open('setup.dat', 'rb') as f: | ||
+ | setup = f.read() | ||
+ | mso.system.load_setup(setup) | ||
</code> | </code> | ||