On Mar 19, 9:42 pm, "Luis M. González" <[EMAIL PROTECTED]> wrote: > On Mar 19, 9:25 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > > > En Mon, 19 Mar 2007 20:46:56 -0300, Luis M. González <[EMAIL PROTECTED]> > > escribió: > > > > What I want now is execute the script I just created. > > > As far as I know, the only way to execute the script is from a command > > > line and typing "setup.py py2exe". > > > A few ways: > > - os.system("commandline"). Simplest way, but you don't have much control, > > and it blocks until the process finishes. > > - os.popen[234]? or the functions in the popen2 module > > - the subprocess module - the most complete way, but simple enough for > > most cases. > > > -- > > Gabriel Genellina > > I'm sorry, but still I can't figure out this... > Would you please show me a sample usage of os.system or os.popen for > passing arguments to the command line? > In this case, I should pass to the command line "setuppy py2exe". > > Thanks! > Luis
[EMAIL PROTECTED]:~$ python Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> rt = os.system("ls") apps Firefox_wallpaper.png s2 tux_sshot_0.ppm xorg.conf.diff Desktop media s3 work downloads permutation.py squeak workspace Examples permutation.pyc trackers xorg.conf.aiglx >>> rt 0 >>> This implies that `os.system("setuppy py2exe")` should do what you want. -- http://mail.python.org/mailman/listinfo/python-list