Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93361 > unrolled thread
| Started by | BartC <bc@freeuk.com> |
|---|---|
| First post | 2015-07-01 09:59 +0100 |
| Last post | 2015-07-01 09:17 -0400 |
| Articles | 6 — 4 participants |
Back to article view | Back to comp.lang.python
win32print BartC <bc@freeuk.com> - 2015-07-01 09:59 +0100
Re: win32print Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-01 11:15 +0100
Re: win32print BartC <bc@freeuk.com> - 2015-07-01 12:02 +0100
Re: win32print Tim Golden <mail@timgolden.me.uk> - 2015-07-01 12:28 +0100
Re: win32print BartC <bc@freeuk.com> - 2015-07-01 14:10 +0100
Re: win32print Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-01 09:17 -0400
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2015-07-01 09:59 +0100 |
| Subject | win32print |
| Message-ID | <b_Nkx.8097$Mi.4254@fx38.am4> |
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! Is this something that actually can be downloaded somewhere? (Or is it obsolete, or a project that I have to build myself? In which case it'll probably be easier to write my own Win32 code but I was trying to avoid that.) -- Bartc
[toc] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2015-07-01 11:15 +0100 |
| Message-ID | <mailman.209.1435745712.3674.python-list@python.org> |
| In reply to | #93361 |
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! > > Is this something that actually can be downloaded somewhere? (Or is it > obsolete, or a project that I have to build myself? In which case it'll > probably be easier to write my own Win32 code but I was trying to avoid > that.) > 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/ -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2015-07-01 12:02 +0100 |
| Message-ID | <iNPkx.1$cg6.0@fx02.am4> |
| In reply to | #93362 |
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!) -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2015-07-01 12:28 +0100 |
| Message-ID | <mailman.213.1435750094.3674.python-list@python.org> |
| In reply to | #93365 |
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
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2015-07-01 14:10 +0100 |
| Message-ID | <9FRkx.15072$hX5.3745@fx09.am4> |
| In reply to | #93366 |
On 01/07/2015 12:28, Tim Golden wrote: > On 01/07/2015 12:02, BartC wrote: >> Yes, I ended up there at one point, but didn't see a win32print.py file, >> Presumably, nowhere on the internet is there a ready-to-use copy of >> win32print.py that someone else could just download with little effort? > 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. OK, thanks, that now works. (I need to click on a .exe file not on .zip, and choose a version that corresponds with what's in the registry, which was 3.1 in my case, not 3.12 nor 3.4 which are also installed. This would be a better basis for solving the problem (driving a bar-code printer). Although it's still not certain how I might distribute the result (just copy the whole directory Python 3.1 tree onto a memory stick perhaps and send that). -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2015-07-01 09:17 -0400 |
| Message-ID | <mailman.217.1435756683.3674.python-list@python.org> |
| In reply to | #93365 |
On Wed, 01 Jul 2015 12:02:36 +0100, BartC <bc@freeuk.com> declaimed the
following:
>
>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!
>
So far as I know, there is no "win32print.py" file... The functions are
part of the win32 /library/, which is a compiled DLL (the file you found
sounds like it may have been the source file for part of the library).
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web