[Tutor] os.system refuses to print from a script
Cerulean Rodent
cerulean_rodent@yahoo.co.uk
Thu, 20 Sep 2001 15:00:31 +0400 (MSD)
Some data is written to file as the script goes about its business.
Printing the file from command line with
lpr filename
works just fine. Invoke the interpreter from the command line, get a
familiar prompt. Enter the following
import os
os.system('lpr filename')
the file gets printed without a glitch.
do the same from the script, and I get
lpr: unable to print file: client-error-bad-request
change os.system('lpr filename') for os.system('pwd') to check whether I'm
in the correct directory... I am. But lpr still returns an error when
invoked from a script (and so does lp, for that matter).
I am probably overlooking something important - any ideas?
Cheerio,
PM XXIII
PS By the by, just how does one dump the results of one's meek attempts at
programming to Useless Python? Is it still available? All the links Google
returns for "useless python" are as dead as Spandau Ballet.
-----------------------------------------------------
" The stars go waltzing out in blue and red,
And arbitrary blackness gallops in:
I shut my eyes and all the world drops dead. "
--Sylvia Plath
-----------------------------------------------------