Print file via file association using os.system or subprocess? (Windows)

Mark Hammond skippy.hammond at gmail.com
Sun Jul 18 20:09:42 EDT 2010


On 19/07/2010 3:46 AM, python at bdurham.com wrote:
> Under Windows: Is there a way to print a file using the file's file
> extension association using either the os.system or subprocess modules
> (vs. win32 extensions)?
> Use case: print PDF or Office documents to default printer without
> having to distribute win32 extensions.
> Thanks,
> Malcolm

You probably want to use the windows ShellExec function with a 'print' verb.

Mark





More information about the Python-list mailing list