Thread: Printing Stuff

    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11

    Printing Stuff


    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???
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    Originally Posted by monkeyman23555
    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???
    Google...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    Thats why I asked here I could not really find anything that told me
  6. #4
  7. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    There must be something out there, maybe a module that can work with printers for Python. Did you try sourceforge?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    not really one sec
  10. #6
  11. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    This might be what you want.
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305690
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    73
    Rep Power
    11
    if you want to just print data as in .txt format then simply save the file and use notepad to print for you
    e.g
    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
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    It is also possible to use the pySerial module to send data to a printer–or at least in theory.

    http://pyserial.sourceforge.net/

    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,

    Mark.
    programming language development: www.netytan.com Hula

  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    ya thats why I can find anything on COM programs with python
  18. #10
  19. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.

    Mark.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo