Ben Cartwright wrote:
> Todd wrote:
> > I'm trying to run the following in python.
> >
> > os.system('/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file
> > \"test.c\")"')
>
> Python is interpreting the \"s as "s before it's being passed to
> os.system.  Try doubling the backslashes.
>
> >>> print '/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> 
> >>> \"test.c\")"'
> /usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> "test.c")"
> >>> print '/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> 
> >>> \\"test.c\\")"'
> /usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> \"test.c\")"
> 
> --Ben

Thanks!  Yay multiple layers of string interpretation.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to