You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
388 B

  1. from load_asset import save,load
  2. device = load('device')
  3. def add_device(name,fund,sys):
  4. device['devices'][name] = {}
  5. device['devices'][name]['fund'] = fund.upper()
  6. device['devices'][name]['sys'] = sys
  7. return None
  8. t = ''
  9. while t != 'exit':
  10. t = t.split(' ')
  11. if len(t) == 3:
  12. add_device(*t)
  13. t = input('(name fund sys) (or exit):')
  14. save(device,'device')