Script Collection
CAD Systems
Shellexecute - Printing with the default application | Shellexecute - Printing with the default application |
|
|
|
This script prints the file in the first argument with the windows default application. Example: If you save the code in the file print.py: print.py test.doc -> Opens Microsoft Word (if it is installed) and prints the file test.py to the default printer. print.py mytextfile.txt -> Same. But prints with Notepad from win32api import ShellExecute from sys import argv ShellExecute(0, "print", argv[1], None, "", 1) |
|
| Last Updated ( Thursday, 02 February 2006 ) |
| < Prev | Next > |
|---|
Hint: For syntax highlighting and correct Python intendation place your code between html tags <pre> and </pre>.