Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图通过 python 打印“.txt”文件。我确实打印了文件,但我怎样才能获得打印菜单来选择打印机和所有属性或打印。我使用此代码打印,它在默认打印机上打印并且不会打开打印菜单?
win32api.ShellExecute (0,"print",filename,None,".",0)
最简单的方法可能是notepad.exe使用该文件打开并让用户从那里选择“打印”。它也可以用作预览窗口。
notepad.exe