/[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.29 by apronotti, Wed Mar 5 20:40:00 2003 UTC revision 1.30 by apronotti, Wed Apr 2 15:17:26 2003 UTC
# Line 135  def previewPrint (table): Line 135  def previewPrint (table):
135    from os import system, remove    from os import system, remove
136    from tempfile import mktemp    from tempfile import mktemp
137    
138    fileName= mktemp (".txt")    file= mktemp (".txt")
139    filePS = mktemp (".ps")    #filePS = mktemp (".ps")
140    fileOut = open(fileName,'w')    fileOut = open(file,'w')
141    for line in table:    for line in table:
142      fileOut.write(line+"\n")      fileOut.write(line+"\n")
143    fileOut.close()    fileOut.close()
   system ("enscript --header='%W|Página $% of $='  -o "+filePS+" "+fileName)  
144    
145    system ("gv "+filePS)    system(gConfig('PrintCommand') % (file))
146      #system ("enscript --header='%W|Página $% de $='  -o "+filePS+" "+file)
147    
148    remove (fileName)    #system ("gv "+filePS)
149    remove (filePS)  
150      remove (file)
151      #remove (filePS)
152    
153  def runFormWCallback (formFile, args, callbackFunction):  def runFormWCallback (formFile, args, callbackFunction):
154    runForm (formFile, args.update ({ 'callback': callbackFunction }))    runForm (formFile, args.update ({ 'callback': callbackFunction }))

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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