Problem printing in Win98

Tim Roberts timr at probo.com
Wed Nov 23 02:04:58 EST 2005


Dale Strickland-Clark <dale at riverhall.nospam.co.uk> wrote:
>
>I presume this .ps file is a preformed postscript file that should be sent
>to a postscript printer without further modification?
>
>In this case, I think you should use copy instead of print. Something like
>this:
>
>win32api.ShellExecute(0, "copy", "file.ps prn", None, ".", 0)

No, that's not how ShellExecute works.  ShellExecute looks up the handler
for the file in the third parameter, based on its extension, and then looks
for the handler for the appropriate "verb" in the second parameter.  It's
just registry magic.  It's not a command line thing.

Most file types have an "open" verb and a "print" verb; some also have
"edit".
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list