On 05Apr2013 16:36, Chris Rebert wrote:
| No need for third-party code, just use the std lib:
| http://docs.python.org/2/library/pipes.html#pipes.quote
| http://docs.python.org/3/library/shlex.html#shlex.quote
Ah, handy. I must say its quote quoting is kind of verbose, though.
| (But yeah, best
On Fri, Apr 5, 2013 at 3:00 PM, Cameron Simpson wrote:
> On 01Apr2013 20:26, John Gordon wrote:
> | In <0c9717ca-52dd-49ce-8102-e14328838...@googlegroups.com> cev...@gmail.com
> writes:
> | > someip = '192.168.01.01'
> | > var1 = 'lynx -dump http://' + someip +
> '/cgi-bin/.log&.submit=+++G
On 01Apr2013 20:26, John Gordon wrote:
| In <0c9717ca-52dd-49ce-8102-e14328838...@googlegroups.com> cev...@gmail.com
writes:
| > someip = '192.168.01.01'
| > var1 = 'lynx -dump http://' + someip +
'/cgi-bin/.log&.submit=+++Go%21+++ > junk'
|
| '&' is a special character in shell commands.
In <0c9717ca-52dd-49ce-8102-e14328838...@googlegroups.com> cev...@gmail.com
writes:
> someip = '192.168.01.01'
> var1 = 'lynx -dump http://' + someip + '/cgi-bin/.log&.submit=+++Go%21+++
> > junk'
'&' is a special character in shell commands. You'll need to quote or
escape it.
Try this:
On Tue, Apr 2, 2013 at 6:22 AM, wrote:
> var1 = 'lynx -dump http://' + someip + '/cgi-bin/.log&.submit=+++Go%21+++
> > junk'
> lynx -dump 'http://192.168.01.01/cgi-bin/.log&.submit=+++Go%21+++ > junk'
The problem is the &, which splits the command. Note how your manual
execution puts
I get the example os.system('ls -al') no problem.
i'm trying to create a variable with my command built in it but needs to
include quotes.
Portion of code is as follows:
someip = '192.168.01.01'
var1 = 'lynx -dump http://' + someip + '/cgi-bin/.log&.submit=+++Go%21+++
> junk'
print