python调用打印机自动打印文件
import win32api,win32printdef printer_loading(filename):
open (filename, "r")
win32api.ShellExecute (
0,
"print",
filename,
#
# If this is None, the default printer will
# be used anyway.
#
'/d:"%s"' % win32print.GetDefaultPrinter (),
".",
0
)
页:
[1]