win32print

Tim Golden mail at timgolden.me.uk
Wed Jul 1 07:28:10 EDT 2015


On 01/07/2015 12:02, BartC wrote:
> On 01/07/2015 11:15, Mark Lawrence wrote:
>> On 01/07/2015 09:59, BartC wrote:
>>> I need to print a text file to whatever printer in Windows is called
>>> 'Generic/Text Only'. I looked for a Python solution and come across Tim
>>> Golden's win32print module which looks perfect, eg:
>>>
>>> http://timgolden.me.uk/pywin32-docs/win32print.html
>>>
>>> However, that tells me everything I need to know except how or where to
>>> download it!
> 
>> That's the standard pywin32 docs that happen to be on Tim's site.  Get
>> the latest pywin32 here
>> http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/
> 
> Yes, I ended up there at one point, but didn't see a win32print.py file,
> only a win32print.cpp one. I think messing about with C++ compilers and
> makefiles (that never work properly under Windows) defeats the object of
> trying to use Python for this purpose!
> 
> Presumably, nowhere on the internet is there a ready-to-use copy of
> win32print.py that someone else could just download with little effort?
> 
> (Anyway, never mind; I'm looking at a solution now that involves
> invoking Windows' rundll32 and notepad to do the job. And it saves the
> problem of instructing someone on the end of a telephone how to install
> even Python let alone locating the add-ons.
> 
> This is task that, in the eighties, would have involved sending a
> string, a byte at a time, to the parallel port, perhaps 3 lines of code.
> It's great that in 2015 everything is so much simpler!)
> 

If I can interrupt your Jeremiad for a moment, this page might help:

  http://timgolden.me.uk/python/win32_how_do_i/print.html

and it (and the docs you found above) relies on this download page:

  http://sourceforge.net/projects/pywin32/files/pywin32/

which, as you can see, has been available for every then-valid version
of Python for some years now.

TJG



More information about the Python-list mailing list