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 })) |