os.system('net use lpt1 \\\\ANDYCOMPAQ\\PrimoPDF /persistent:yes')
os.system('type system_ex.txt > LPT1')
// You can create your own command-line using 'my_cmd' and 'my_cmd_end'.
// "my_cmd": "WORDPAD /PT ",
// "my_cmd_end": " YourPrinterName"
// will open the file in Wordpad and print it to your named printer.
// (Wordpad needs to be on your environment paths.)
// IMPORTANT: There needs to be spaces at the end of my_cmd and
// the beginning of my_cmd_end, as the filename will be inserted
// between these two expressions.
// Also escape back-slashes \ to \\.
// Quotes will be problematic. If possible, set an environment path,
// and change your printer name, to avoid the need for quotes
// around spaces.
// Omit my_cmd_end, or set it to false, if not required.
Users browsing this forum: Exabot [Bot], Google [Bot], Vlad Ghitulescu and 18 guests