[Tutor] os.execl() args?

Tadahiko 'kiko' Uehara kikofx@nifty.com
Sat May 10 14:11:27 2003


Hi everyone,

I'm having a hard time to understand this...

<snip>
 render = '/usr/local/bin/Render'  # <--- this is external program

	for queue in queueLines:             
                os.execl(render,'',queue) # <--- here
<snip>

variable 'queue' has '/mnt/work/maya/py/scenes/pyTest001.mb' after extract from queueLines. but this returns error message 'Unmatched ".' .

However, if i declair variable 'queue = /mnt/work/maya/py/scenes/pyTest001.mb' somewhere in the program, it works.

so my question is,

1) Why this doesn't work?
 Insert 'print queue' after 'for~ :' line, I see the same string '/mnt/work/maya/py/scenes/pyTest001.mb'. I don't understand why this doesn't work.

2) os.execl(render,'',queue) , I had to give arg0 blank. I found the following explanation in the doc...

"For the C programmer, this is the argv[0] passed to a program's main(). For example, "os.execv('/bin/echo', ['foo', 'bar'])" will only print "bar" on standard output; "foo"will seem to be ignored."

 I'm not quite sure what it says.. Though, give argv0 to nothing'' is correct?

3) What would be the main difference using 'os.exec*()' and 'os.system()' ?
 For my task, both acts like same..


Sorry for long mail and multiple question.
-kiko