April 23rd, 2005, 04:44 PM
I guess you all asked yourself WTF?
Okay well I hope you all know what a printer is, the thing that spits out paper with letters on it...
Now how do I use a printer from python???
April 23rd, 2005, 08:33 PM
Originally Posted by monkeyman23555
April 24th, 2005, 06:24 AM
Thats why I asked here I could not really find anything that told me
April 24th, 2005, 11:08 AM
There must be something out there, maybe a module that can work with printers for Python. Did you try sourceforge?
April 24th, 2005, 11:56 AM
April 24th, 2005, 03:19 PM
This might be what you want.
April 24th, 2005, 07:14 PM
if you want to just print data as in .txt format then simply save the file and use notepad to print for you
execute the command using os.popen, os.command....
start /min notepad /p FILENAME
this will starts notepad, in a minized mode, and prints the file gives using default printer
there's also ( lpr FILENAME ) available on most posix compatable systems
there's also a module called PyPrint check it out
and you can tailor your format, using win32 module
or with wxPython
finally if you're serious about it then I would recommend wxPython
April 25th, 2005, 01:56 PM
It is also possible to use the pySerial module to send data to a printer–or at least in theory.
That said I would use the CUPS (Common Unix Printing System) on *nix systems for simplicity as mentioned by weam. On Windows you will probably get more control using COM, however I have little experience with this .
My $0.02 anyway,
April 26th, 2005, 10:02 AM
ya thats why I can find anything on COM programs with python
April 26th, 2005, 01:36 PM
Do you mean you can't find anything on using Python with COM? If so I would suggest mark Hammonds "Python Programing on Win32". The book is a little old but nothing much has changed on the COM front in ages so everything should work fine .
Other than that I would try searching this forum and Google, and see what comes up.