os.startfile() - one or two arguments?

Scott David Daniels scott.daniels at acm.org
Fri Apr 28 11:19:30 EDT 2006


BartlebyScrivener wrote:
> Can any Windows user give a working example of adding a "command verb"
> to os.startfile()?
> 
> When I try it, it squawks that it takes only one argument.
> 
>>>> os.startfile('d:/','explore')
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
> TypeError: startfile() takes exactly 1 argument (2 given)

Works fine for me with Python 2.5a2 on Win2K
I ran: os.startfile('c:/','explore')
And an explorer window popped up.

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list