open and shut case

Cameron Laird claird at lairds.us
Mon Sep 27 14:08:05 EDT 2004


In article <mailman.3963.1096295292.5135.python-list at python.org>,
Erik Heneryd  <erik at heneryd.com> wrote:
>Erik Heneryd wrote:
>> Dennis Lee Bieber wrote:
>> 
>>> On Sun, 26 Sep 2004 16:55:48 GMT, "Elaine Jackson"
>>> <elainejackson7355 at home.com> declaimed the following in
>>> comp.lang.python:
>>>
>>>
>>>> "Cameron Laird" <claird at lairds.us> wrote in message
>>>> news:nf1i22-7hd.ln1 at lairds.us...
>>>> | Did this [some snipped code] meet your needs, Ms. Jackson?
>>>>
>>>> Here's what it does:
>>>>
>>>>
>>>>>>> import os, win32api
>>>>>>> pid = os.spawnlp(os.P_NOWAIT, "iexplore.exe",
>>>>
>>>>
>>>> "iexplore.exe",r"c:\blabla\hej.html")
>>>>
>>>> Traceback (most recent call last):
>>>>  File "<pyshell#1>", line 1, in -toplevel-
>>>>    pid = os.spawnlp(os.P_NOWAIT, "iexplore.exe",
>>>> "iexplore.exe",r"c:\blabla\hej.html")
>>>> AttributeError: 'module' object has no attribute 'spawnlp'
>>>>
>>>
>>>
>>>     It seems the spawn family doesn't have the "search in PATH"
>>> option... os.execlp does exist, but likely doesn't do what you want
>>> either...
>>>
>> 
>> It does, see http://docs.python.org/lib/os-process.html.
>> exec* replaces the current process, so you can't use that if you expect 
>> it to return.  I can't see why my code shouldn't work (though I'm not on 
>> a Windows box so I can't test it).
>
>Forget about it.  I just actually read the spawn* docs:
>
>Availability: Unix, Windows. spawnlp(), spawnlpe(), spawnvp() and 
>spawnvpe() are not available on Windows. New in version 1.6.
			.
			.
			.
This is silly.  Ms. Jackson has asked for an *extremely* basic
technique.  I don't have a Win* keyboard within reach, and am
reluctant to speculate, at this point.  I'm certain, though, 
that her question has multiple simple answers.  Ms. Jackson,
how urgent is your need?  Does someone else want to chip in
with conclusive information?



More information about the Python-list mailing list