[Tutor] example of spawn

Jason Coggins jason at asahnekec.com
Wed Jun 6 01:21:27 CEST 2007


In the example listed below, reproduced from the web page you recommended, 
what does `cp`, `cp` and `/dev/null` do?  I am assuming `index.html` is the 
name of the program that will be launched.

example:----------------------------------------------
os.spawnlp(os.P_WAIT, 'cp', 'cp', 'index.html', '/dev/null')
--------------------------------------------------------

Jason

----- Original Message ----- 
From: "Alan Gauld" <alan.gauld at btinternet.com>
To: <tutor at python.org>
Sent: Tuesday, June 05, 2007 5:32 PM
Subject: Re: [Tutor] example of spawn


> "Jason Coggins" <jason at asahnekec.com> wrote
>
>> Would someone please provide me a short, simple
>> example of the spawn statement.
>> I am having trouble figuring the syntax out.
>
> There are two examples in the os module documentation.
>
> http://docs.python.org/lib/os-process.html
>
>
> What part do you not understand?
>
>
> -- 
> Alan Gauld
> Author of the Learn to Program web site
> http://www.freenetpages.co.uk/hp/alan.gauld
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor 



More information about the Tutor mailing list