daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import json
  2.  
  3. def create_file(fileName, structure):
  4.     with open(fileName, mode='w') as f:
  5.         json.dump(structure, f, indent=2)
  6.  
  7.  
  8. if __name__ == '__main__':
  9.     plugin = {}
  10.  
  11.     plugin['module'] = 'plugin-name'
  12.     plugin['icon'] = 'icon.png'
  13.  
  14.     plugin['menu-app'] = 'name'
  15.  
  16.     plugin['toolbar'] = {'name':'tooltip', 'icon':'path'}
  17.  
  18.     plugin['display'] = 'icon'
  19.  
  20.     plugin['properties'] = {'name':'tooltip', 'icon':'path'}
  21.  
  22.     plugin['menu-project'] = {'name':'tooltip', 'icon':'path'}
  23.  
  24.     plugin['menu-editor'] = 'name'
  25.  
  26.     plugin['connect'] = ('returnKeyEvent', 'anyKeyEvent',
  27.                         'run-code', 'run-program',)
  28.  
  29.     create_file('pugin-example.json', plugin)
RAW Paste Data
Top