For a project i’m working on, I need to be able to write to a text file and then send that file to the printer. I’m fairly new to programming (1.5 yrs) and in my time have never needed to do this.
So, my question is how would I send the file to the printer? (Obviously I know how to write to the file in the first place). I need the program to work on windows XP and windows 7, I’ve come across something called the lpr online but I can’t find anything substantial, and this seems to be related to UNIX based OS’es.
I have a feeling I may need to use os.system() somewhere but am unsure how I would go about this.
A simple approach is to have Notepad print the text file: