Package pyforms
[hide private]
[frames] | no frames]

Source Code for Package pyforms

 1  #!/usr/bin/python 
 2  # -*- coding: utf-8 -*- 
 3   
 4  __author__      = "Ricardo Ribeiro" 
 5  __credits__     = ["Ricardo Ribeiro"] 
 6  __license__     = "MIT" 
 7  __version__     = "0.1" 
 8  __maintainer__  = "Ricardo Ribeiro" 
 9  __email__       = "ricardojvr@gmail.com" 
10  __status__      = "Production" 
11   
12   
13  from pyforms import conf 
14   
15   
16   
17   
18  if conf.PYFORMS_MODE in ['GUI','GUI-OPENCSP']: 
19           
20          from pyforms.gui                                                import Controls 
21          from pyforms.gui.BaseWidget                             import BaseWidget 
22          try: 
23                  from pyforms.gui.PyFormsStateMachine    import PyFormsStateMachine, gotoAppState, PyFormsState 
24          except:  
25                  print("PyFormsStateMachine is not working") 
26   
27           
28          if conf.PYFORMS_MODE in ['GUI-OPENCSP']:        from pyforms.gui.appmanager import startApp 
29          else:                                                                           from pyforms.gui.standaloneManager import startApp 
30   
31   
32   
33  elif conf.PYFORMS_MODE in ['TERMINAL']: 
34   
35          from pyforms.terminal                           import Controls 
36          from pyforms.terminal.BaseWidget        import BaseWidget 
37   
38          try: 
39                  from pyforms.terminal.PyFormsStateMachine       import PyFormsStateMachine, gotoAppState, PyFormsState 
40          except: 
41                  print("PyFormsStateMachine is not working") 
42   
43          from pyforms.terminal.appmanager        import startApp 
44   
45   
46   
47  elif conf.PYFORMS_MODE in ['WEB']: 
48   
49   
50          from pyforms.web                                                import Controls 
51          from pyforms.web.BaseWidget                             import BaseWidget 
52          try: 
53                  from pyforms.web.PyFormsStateMachine    import PyFormsStateMachine, gotoAppState, PyFormsState 
54          except: 
55                  print("PyFormsStateMachine is not working") 
56   
57          from pyforms.web.appmanager                     import startApp 
58