Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:python-ivi:readme [2014/02/12 19:27] – [Included drivers] alexen:python-ivi:readme [2014/02/12 19:28] (current) – [Usage example] alex
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>