"Todd" <[EMAIL PROTECTED]> writes:

> Ben Cartwright wrote:
> > >>> 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.

If it helps, Python has "raw string" syntax that can help alleviate this.

    >>> print r'/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> 
\"test.c\")"'
    /usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> \"test.c\")"

    >>> filename = "test.c"
    >>> cmd_template = r'/usr/bin/gnuclient -batch -l htmlize -eval 
"(htmlize-file> \"%s\")"'
    >>> command = cmd_template % filename
    >>> print command
    /usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> \"test.c\")"


-- 
 \                          "Everything is futile."  -- Marvin of Borg |
  `\                                                                   |
_o__)                                                                  |
Ben Finney

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

Reply via email to