[Tutor] Puzzled again

Richard D. Moores rdmoores at gmail.com
Wed Aug 3 08:07:01 CEST 2011


On Tue, Aug 2, 2011 at 21:59, Dave Angel <d at davea.name> wrote:

> When I paste that from your email into a file and run Python 2.7 on it, it
> behaves fine with no errors.  That's in Linux.

I should have said that I'm using Wing IDE Professional 4.0.3-1 (rev
24721), Windows Vista, and Python 3.2.1.

> But the easiest explanation is that you perhaps used a funny character for
> your triple-quotes.  And when you retyped them on a new line, you typed
> regular ones.
>
> For example, I've seen that sort of thing when someone wrote code in a
> Windows word processor that had "smart quotes."

No, no funny characters with Wing.

Thanks for your guess, Dave.

But here's a try using the regular command line:

C:\Windows\System32>python
Python 3.2.1 (default, Jul 10 2011, 20:02:51) [MSC v.1500 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from mycalc import convertPath
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python32\lib\site-packages\mycalc.py", line 36
    """
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes
in position 149-151: truncated \UXXXXXXX
X escape
>>>

Dick


More information about the Tutor mailing list