os.startfile: Why is there no arguments option?

Thomas Heller theller at ctypes.org
Wed Oct 12 05:45:18 EDT 2011


Am 12.10.2011 10:22, schrieb Christian Wutte:
> Hello all,
> as stated in the docs [1] os.startfile relies on Win32 ShellExecute().
> So maybe someone can explain it to me, why there is no support for
> program arguments.
> That's quite a pity since os.startfile is the easiest way for an
> elevated run (with 'runas' as option) and without arguments of limited
> use.
>
> [1] http://docs.python.org/library/os.html?highlight=startfile#os.startfile
>
> Thanks,
> Christian

It is trivial to call ShellExecute with ctypes.

Thomas



More information about the Python-list mailing list