Maintaining device connection with "with statement" #468
-
|
I am devising some higher level functions that comprise tm_devices functions. I am wondering if there is a way to keep the device manager from closing without using the with statement shown in many of the examples. I've tried to rewrite the examples without the with statement but the device manager seems to close immediately after establishing connection unless I keep subsequent device commands within the with statement. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
See the docs here: https://tm-devices.readthedocs.io/stable/basic_usage/#registering-the-device-manager-to-be-closed-at-program-termination If you can provide some code examples, I can try to help figure out a way to do what you want. I know it is possible, since we do that kind of thing all the time. 😃 |
Beta Was this translation helpful? Give feedback.
See the docs here: https://tm-devices.readthedocs.io/stable/basic_usage/#registering-the-device-manager-to-be-closed-at-program-termination
If you can provide some code examples, I can try to help figure out a way to do what you want. I know it is possible, since we do that kind of thing all the time. 😃