# TPX simple scripting example.
# Do not create the pypixet and pixet, they exist by default
devices = pixet.devicesByType(pixet.PX_DEVTYPE_MPX2)
dev = devices[0]
pixcfg = dev.pixCfg()
pixcfg.setModeAll(pixet.PX_TPXMODE_TOT)
print("dev.doSimpleAcquisition (3 frames @ 1 sec) - start")
rc = dev.doSimpleAcquisition(3, 1, pixet.PX_FTYPE_AUTODETECT, "example.png")
print("dev.doSimpleAcquisition - end: %d (0 is OK)" % rc)
# do not execute the pixet.exitPixet(), it will cause whole the Pixet program to exit
