I get the example os.system('ls -al')     no problem.

i'm trying to create a variable with my command built but needs to include
quotes.
Portion of code is as follows:
someip = '192.168.01.01'

var1 = 'lynx -dump http://' + someip +
'/cgi-bin/xxxx.log&.submit=+++Go%21+++  > junk'

print  var1

os.system(var1)


If I print var1 it looks right .  If I use the os.system(var1) as above it
seems to have a problem near the end of the string with msg
sh: .submit=+++Go%21+++: command not found

clearly there is some escape sequence that I don't understand .

I tried combinations of single and double quotes and mixed around var1, but
that generates command not found.

I need it to look like how I enter it manually and works
lynx -dump 'http://192.168.01.01/cgi-bin/xxxx.log&.submit=+++Go%21+++  >
junk'

Probably obvious to many but i'm spinning my wheels.  many thanks for help .
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to