Examples
You can download all nimodinst examples here
nimodinst_all_devices.py
1#!/usr/bin/python
2
3import nimodinst
4
5
6def example():
7 with nimodinst.Session('') as session:
8 if len(session) > 0:
9 print("%d items" % len(session))
10 print("{: >20} {: >15} {: >10}".format('Name', 'Model', 'S/N'))
11 for d in session:
12 print("{: >20} {: >15} {: >10}".format(d.device_name, d.device_model, d.serial_number))
13
14
15def _main():
16 example()
17
18
19def test_example():
20 example()
21
22
23if __name__ == '__main__':
24 _main()
25
26