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

Source Code for Module Gnumed.pycommon.gmPrinting

 1  """GNUmed printing.""" 
 2  # ======================================================================= 
 3  # $Source: /cvsroot/gnumed/gnumed/gnumed/client/pycommon/gmPrinting.py,v $ 
 4  # $Id: gmPrinting.py,v 1.4 2010/01/03 18:16:47 ncq Exp $ 
 5  __version__ = "$Revision: 1.4 $" 
 6  __author__  = "K.Hilbert <Karsten.Hilbert@gmx.net>" 
 7  __license__ = 'GPL (details at http://www.gnu.org)' 
 8   
 9  # ======================================================================= 
10  import logging, sys 
11   
12   
13  if __name__ == '__main__': 
14          sys.path.insert(0, '../../') 
15          from Gnumed.pycommon import gmLog2 
16          from Gnumed.pycommon import gmI18N 
17          gmI18N.activate_locale() 
18          gmI18N.install_domain() 
19   
20   
21  from Gnumed.pycommon import gmShellAPI 
22   
23   
24  _log = logging.getLogger('gm.printing') 
25  _log.info(__version__) 
26   
27   
28  known_printjob_types = [ 
29          u'medication_list', 
30          u'generic_document' 
31  ] 
32   
33  # ======================================================================= 
57  # ======================================================================= 
58  # main 
59  #------------------------------------------------------------------------ 
60  if __name__ == '__main__': 
61   
62 - def test_print_file():
63 return print_file_by_shellscript (filename = sys.argv[2], jobtype = sys.argv[3])
64 #-------------------------------------------------------------------- 65 if len(sys.argv) > 1 and sys.argv[1] == 'test': 66 print test_print_file() 67 68 # ======================================================================= 69 # $Log: gmPrinting.py,v $ 70 # Revision 1.4 2010/01/03 18:16:47 ncq 71 # - much streamlined 72 # 73 # Revision 1.3 2010/01/01 21:19:20 ncq 74 # - print job types registry 75 # 76 # Revision 1.2 2009/12/25 21:42:52 ncq 77 # - gm_print* -> gm-print* 78 # - no more .sh 79 # - proper argument order for shell script 80 # 81 # Revision 1.1 2009/12/25 19:04:50 ncq 82 # - new code 83 # 84 # 85