[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

pavloutefkros@gmail.com

3/9/2008 9:23:00 PM

i'm trying to execute a file without replacing the current process,
but after searching the help file, documentations and the web, i can't
a way of doing that.

os.exec*() will close the current program.

ps: by executing i mean like typing "mspaint" in run dialog.. it's not
a python file
5 Answers

pavloutefkros@gmail.com

3/9/2008 9:29:00 PM

0

i know os.popen() but i want to execute a file with args

pavloutefkros@gmail.com

3/9/2008 9:33:00 PM

0

ok i found a workaround.

Dan Upton

3/9/2008 9:41:00 PM

0

On Sun, Mar 9, 2008 at 5:22 PM, Gif <pavloutefkros@gmail.com> wrote:
> i'm trying to execute a file without replacing the current process,
> but after searching the help file, documentations and the web, i can't
> a way of doing that.
>
> os.exec*() will close the current program.
>
> ps: by executing i mean like typing "mspaint" in run dialog.. it's not
> a python file

On *nix, you can use os.fork(). According to
http://effbot.org/libraryb... , you can use os.spawn to
accomplish a similar effect on Windows, although I haven't used it.
Also, you might check the subprocess module --
http://docs.python.org/lib/module-subpr... .

-dan

Aaron Brady

3/9/2008 11:42:00 PM

0

> >  os.exec*() will close the current program.
>
> On *nix, you can use os.fork().  According tohttp://effbot.org/libraryb..., you can use

Do you mean, and block for the process to terminate? Or do you mean,
do something else in the meantime, perhaps for a certain amount (of
meantime)?

[Enter event loops. Exeunt.]

P.S. What do you do if you think of a comeback for something from a
week ago on the newsgroup?

P.P.S. Why are you thinking of comebacks on a newsgroup besides
alt.flame?

P.P.P.S. Anyone read alt.tasteless?

Benjamin

3/10/2008 3:06:00 AM

0

On Mar 9, 4:22 pm, Gif <pavloutefk...@gmail.com> wrote:
> i'm trying to execute a file without replacing the current process,
> but after searching the help file, documentations and the web, i can't
> a way of doing that.
>
> os.exec*() will close the current program.
Have a look at the subprocess module.
>
> ps: by executing i mean like typing "mspaint" in run dialog.. it's not
> a python file