without shell

Grant Edwards grante at visi.com
Fri Jun 10 15:16:56 EDT 2005


On 2005-06-10, Donn Cave <donn at u.washington.edu> wrote:

>>   Also, for each of these variants, on Unix, cmd may be a
>>   sequence, in which case arguments will be passed directly to
>>   the program without shell intervention (as with os.spawnv()).
>>   If cmd is a string it will be passed to the shell (as with
>>   os.system()).
>> 
>> It's not exactly clear what "these variants" refer to, but I
>> read it as referring to all of the the os.popen functions.
>> 
>> Perhaps it only refers to os.popen[234]?
>
> Right.  The paragraphs seem a little scrambled.  Note
> the use of "cmd" instead of "command" as the parameter
> is named for popen().  Also note "These methods do not
> make it possible to retrieve the return code from the
> child processes", after the popen() paragraph above tells
> you how to do it (using the better term "exit status".)
>
> Or one may look at the source.

Or write a 3-line test to see how it really does works. :)

-- 
Grant Edwards                   grante             Yow!  ... I don't like
                                  at               FRANK SINATRA or his
                               visi.com            CHILDREN.



More information about the Python-list mailing list