<br><br><div><span class="gmail_quote">On 28 Apr 2006 08:06:02 -0700, <b class="gmail_sendername">BartlebyScrivener</b> <<a href="mailto:rpdooling@gmail.com">rpdooling@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Can any Windows user give a working example of adding a "command verb"<br>to os.startfile()?<br><br>When I try it, it squawks that it takes only one argument.<br><br>>>> os.startfile('d:/','explore')</blockquote>
<div><br>ry:<br>
os.startfile(["d:/",  "explore"])<br>
<br>
you want a list for the args  </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Traceback (most recent call last):<br>  File "<interactive input>", line 1, in ?
<br>TypeError: startfile() takes exactly 1 argument (2 given)<br><br>from os module<br><br>startfile(      path[, operation])<br>    Start a file with its associated application.<br><br>    When operation is not specified or 'open', this acts like
<br>double-clicking the file in Windows Explorer, or giving the file name<br>as an argument to the start command from the interactive command shell:<br>the file is opened with whatever application (if any) its extension is
<br>associated.<br><br>    When another operation is given, it must be a ``command verb'' that<br>specifies what should be done with the file. Common verbs documented by<br>Microsoft are 'print' and 'edit' (to be used on files) as well as
<br>'explore' and 'find' (to be used on directories).<br><br>Thanks,<br><br>rpd<br><br>"Give a man a fire and keep him warm for a day. Light a man on fire and<br>he will be warm for rest of his life." --Terry Pratchett
<br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>