Re: Spawn/Exec with asterisk in argument

2007-04-19 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > Thanks for the reply Michael. No problem. > I used ls as a simple example, but I'm > using this with scp to transfer files and need shell expansion. It > makes sense since the shell isn't spawning the process, but it's been > a while since I've worked with ipc. I usu

Re: Spawn/Exec with asterisk in argument

2007-04-19 Thread jeremyfee
On Apr 18, 7:24 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote: > If you want to process asterisk the way the shell does, you can pass > things through the shell. os.system is one way of doing that. Probably > better is: > > subprocess.check_call("ls -l *", shell=True) Thanks for the reply Michael

Re: Spawn/Exec with asterisk in argument

2007-04-18 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > The spawn* and exec* functions appear to escape asterisks, I'm > guessing all shell characters too, before the spawn/exec'ed process > sees them. No. It is the shell that ordinarily processes these characters and gives them a special meaning. On most systems, ls does no

Spawn/Exec with asterisk in argument

2007-04-18 Thread jeremyfee
The spawn* and exec* functions appear to escape asterisks, I'm guessing all shell characters too, before the spawn/exec'ed process sees them. Is there a way around this? Not sure if this is a bug or a "feature". user$ touch test.txt user$ ls -l * -rw-r--r-- 1 user user 0 Apr 18 18:30 test.tx