In Python, if I want to open / launch the default browser using the shell, I can import os and run run "www.google.com". Is there a similar way to open the image print dialog for a given .jpg image, as if he had right-clicked and selected print in the context menu that I can use to call this routine from python ???
Thank.
You can call win32api.ShellExecuteusing the verb "print". Example: http://timgolden.me.uk/python/win32_how_do_i/print.html
win32api.ShellExecute
"print"
, Windows (Windows 7), , . , ShellExecute, , . :
import time, win32api win32api.ShellExecute(0, "print", "test.jpg", None, None, 0) time.sleep(5)
sleep() , python , .
sleep()
, . , .
, , pythonw, . , Python, , .
pythonw