News

Depending on the type of system you use, the commands necessary to send text or files to the printer will vary. For Windows, you can use the Python win32 module.
Using stdin as a file object allows Python to read input, which is piped to it from other commands, and writing to stdout allows it to continue passing the information through the piping system.