How to execute a command line in a Python program?

Mindy csshi99 at yahoo.com
Sat Nov 9 19:04:06 EST 2002


Hey, in my python program, I want to call another
program or command, say, emacs filename&, how to get
to this? I found there's execfile() function in
Python? Do I need to write a shell program which calls
"exec emacs filename&" and then, in my python progam,
use execfile to execute this shell program? Is there
any simple way?

Thanks!

Generally, my python program is like this:
....
write a large number of data to file1
....
want to use emacs or other text editor to view the
content of file1. because the file is so big, it's
inappropriate to print it out
....





=====
Cheers
-Mindy

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2




More information about the Python-list mailing list