[EMAIL PROTECTED] wrote:
> Hi,
> I am trying to run the following example which uses PULP for linear
> optimization. But I am getting this error in the last line: "EOL while
> scanning single quoted string".
> GLPK("C:\Documents and
> Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\").solve(prob)
Backslashes escape characters in strings. Specifically, when a string uses ""
quotes as delimiters, then \" is the escape sequence for a double quote in the
string itself. The parser sees your \" at the end as simply an escaped double
quote and keeps interpreting the rest of the line as a string. Since the line
ends before another, unescaped " comes along, it raises the exception that you
see.
http://docs.python.org/ref/strings.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list