/[papo]/papo/forms/hack.py
ViewVC logotype

Diff of /papo/forms/hack.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by apronotti, Mon Apr 14 16:41:53 2003 UTC revision 1.33 by charlie, Mon Apr 14 23:26:54 2003 UTC
# Line 115  def confirmRollback (form, block, commit Line 115  def confirmRollback (form, block, commit
115        form.setFocus(entry)        form.setFocus(entry)
116    
117  #   'imprime' a travez de un report  #   'imprime' a travez de un report
118  def pleasePrint (form, printer, docType, report, args):  def pleasePrint (form, printer, docType, report, args, command="lpr"):
119    from os import system, remove    from os import system, remove
120    from tempfile import mktemp    from tempfile import mktemp
121    
# Line 124  def pleasePrint (form, printer, docType, Line 124  def pleasePrint (form, printer, docType,
124    # argStr= " ".join (map (lambda key: "%s=%s" % (key, args[key]), args.keys ()))    # argStr= " ".join (map (lambda key: "%s=%s" % (key, args[key]), args.keys ()))
125    argStr= " ".join (args)    argStr= " ".join (args)
126    system ("grcvs -D file --filter csv -d "+fileName+" ../report/"+report+".grd "+argStr)    system ("grcvs -D file --filter csv -d "+fileName+" ../report/"+report+".grd "+argStr)
127    #system ("../print/print.py "+' '.join([printer, docType, fileName])+" | lpr")    #system ("../print/print.py "+' '.join([printer, docType, fileName])+" | " + command)
128    system ("../print/print.py "+' '.join([printer, docType, fileName])+" > /tmp/invoice.txt ")    system ("../print/print.py "+' '.join([printer, docType, fileName])+" > /tmp/invoice.txt ")
129    while form.genericBox ('Verifique que se haya impreso bien', ['Listo', 'Reintentar'])==2:    while form.genericBox ('Verifique que se haya impreso bien', ['Listo', 'Reintentar'])==2:
130      #system ("../print/print.py "+' '.join([printer, docType, fileName])+" | lpr")      #system ("../print/print.py "+' '.join([printer, docType, fileName])+" | " + command)
131      system ("../print/print.py "+' '.join([printer, docType, fileName])+" > /tmp/invoice.txt ")      system ("../print/print.py "+' '.join([printer, docType, fileName])+" > /tmp/invoice.txt ")
132    remove (fileName)    remove (fileName)
133    

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26