Re: os.system question

2007-12-28 Thread stanleyxu
> > import subprocess > > output = subprocess.Popen('MD "' + new_folder + '"', shell=True, > stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0] > print output > > > Carl Banks Thanks Carl, it works ^^) -- ___ oo // \\ (_,\/ \_/ \ Xu, Qian \ \_/_\_/>

Re: os.system question

2007-12-28 Thread stanleyxu
Thanks again for your kindly tips. -- ___ oo // \\ (_,\/ \_/ \ Xu, Qian \ \_/_\_/> stanleyxu2005 /_/ \_\ -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system question

2007-12-28 Thread stanleyxu
[EMAIL PROTECTED] wrote: > On Dec 28, 12:57 pm, stanleyxu <[EMAIL PROTECTED]> wrote: >> To note this problem occurs when debugging script in IDLE editor. >> When I double click on my_script.py, all outputs will be printed in one >> console. >&

Re: os.system question

2007-12-28 Thread stanleyxu
To note this problem occurs when debugging script in IDLE editor. When I double click on my_script.py, all outputs will be printed in one console. -- ___ oo // \\ (_,\/ \_/ \ Xu, Qian \ \_/_\_/> stanleyxu2005 /_/ \_\ -- http://mail.python.org/mailman/listinfo/py

os.system question

2007-12-28 Thread stanleyxu
Hi All, I am porting Perl script to Python script. Everything works fines until calling os.system(). In my script, a number of DOS-commands will be executed. for new_folder, old_folder in folder_array: os.system('MD "' + new_folder + '"'); os.system('XCOPY "' + old_folder + '" "