How do you write to the printer ?
marduk at letterboxes.org
Thu Jan 8 20:07:34 CET 2009
On Wed, 2009-01-07 at 16:46 -0600, David at bag.python.org wrote:
> Can find nothing in the on-line docs or a book.
> Groping in the dark I attempted :
> import io
> io.open('stdprn','w') # accepted
> stdprn.write('hello printer') # fails < stdprn is not defined >
You didn't specify what platform you are running on, but the first
problem I see with the above is... well stdprn is not defined. Did you
sdtprn = io.open('stdprn', 'w')
However on a Linux system that will simply open and write to a file
called 'stdprn' in your current directory.
More information about the Python-list