Thanks everyone,
I was trying it this way.

x1, x2 = LeafJawPositions.split(r'\\')




On Wed, Apr 2, 2008 at 11:00 AM, Michael Connors <[EMAIL PROTECTED]>
wrote:

>
>  >>> LeafJawPositions='-42.000000000001\29.800000000001'
> > >>> LeafJawPositions
> > '-42.000000000001\x029.800000000001'
> > >>> x1, x2 = LeafJawPositions.split('\x0')
> > ValueError: invalid \x escape
> > >>> x1, x2 = LeafJawPositions.split('\')
> >
> > SyntaxError: EOL while scanning single-quoted string
> > >>>
> >
> > Hi,
> The backslash is used for escaping special characters in a string. In
> order to do what you are trying to do, you would need to escape the
> backslash using a backslash.
> You need to do this in two places in the above code.
> LeafJawPositions='-42.000000000001\\29.800000000001'
>
> and
>
> x1, x2 = LeafJawPositions.split('\\')
>
> http://docs.python.org/ref/strings.html
>
> Regards,
> Michael
>
>


-- 
"The game of science can accurately be described as a never-ending insult to
human intelligence." - João Magueijo
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to