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