Package Gnumed :: Package pycommon :: Module gmPrinting
[frames] | no frames]

Source Code for Module Gnumed.pycommon.gmPrinting

 1  """GNUmed printing.""" 
 2  # ======================================================================= 
 3  __version__ = "$Revision: 1.4 $" 
 4  __author__  = "K.Hilbert <Karsten.Hilbert@gmx.net>" 
 5  __license__ = 'GPL (details at http://www.gnu.org)' 
 6   
 7  # ======================================================================= 
 8  import logging, sys, os 
 9   
10   
11  if __name__ == '__main__': 
12          sys.path.insert(0, '../../') 
13  from Gnumed.pycommon import gmShellAPI 
14  from Gnumed.pycommon import gmTools 
15   
16   
17  _log = logging.getLogger('gm.printing') 
18  _log.info(__version__) 
19   
20   
21  known_printjob_types = [ 
22          u'medication_list', 
23          u'generic_document' 
24  ] 
25   
26  # ======================================================================= 
53  # ======================================================================= 
54  # main 
55  #------------------------------------------------------------------------ 
56  if __name__ == '__main__': 
57   
58          if len(sys.argv) < 2: 
59                  sys.exit() 
60   
61          if sys.argv[1] != 'test': 
62                  sys.exit() 
63   
64          from Gnumed.pycommon import gmLog2 
65          from Gnumed.pycommon import gmI18N 
66          gmI18N.activate_locale() 
67          gmI18N.install_domain() 
68   
69   
70 - def test_print_file():
71 return print_file_by_shellscript (filename = sys.argv[2], jobtype = sys.argv[3])
72 #-------------------------------------------------------------------- 73 74 print test_print_file() 75 76 # ======================================================================= 77