In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2005-06-10, Mage <[EMAIL PROTECTED]> wrote: > > >>py> file_list = os.popen("ls").read() > >> > >>Stores the output of ls into file_list. > >> > > These commands invoke shell indeed. > > Under Unix, popen will not invoke a shell if it's passed a > sequence rather than a single string. I suspect you're thinking of the popen2 functions. On UNIX, os.popen is posix.popen, is a simple wrapper around the C library popen. It always invokes the shell. The no-shell alternatives are spawnv (instead of system) and the popen2 family (given a sequence of strings.) Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list