
Hello, I am trying the translated pypy-c on Windows (Win2K, MSVC6, python2.3.3), and I can't make it execute anything. Here is a typical session: ========================================================== C:\dev\pypy\dist-pypy\pypy\translator\goal>pypy-c.exe debug: entry point starting debug: argv -> pypy-c.exe debug: importing code debug: calling code.interact() Python 2.4.1 (pypy 0.7.1 build) on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole)
1+1
^Z File "<console>", line 1 ^ SyntaxError: Unknown character
^Z C:\dev\pypy\dist-pypy\pypy\translator\goal> ==========================================================
(I typed ^Z twice) Oviously a parser/compiler problem. But bin/py.py works correctly. Is it a known issue? Does it occur on other platforms? And: Where do I start if I want to work out the problem? -- Amaury Forgeot d'Arc Ubix Development www.ubitrade.com

Hi Amaury, On Fri, Sep 30, 2005 at 05:49:11PM +0200, Amaury Forgeot D Arc wrote:
(InteractiveConsole)
1+1
^Z File "<console>", line 1
^ SyntaxError: Unknown character
One explanation might be that the input string seen is somehow different to what we expect. I can remember a situation (not related to PyPy) where in some terminal using the Backspace key would apparently work, but actually be introduced as characters in the result -- e.g. the string would be '1-\x08+1' if you typed <1><-><backspace><+><1><enter>. Or maybe the string ends in '\r\n' and the tokenizer doesn't recognize the '\r'? Try writing a small .py file and running it non-interactively, and see if this works or if it also gives a SyntaxError. If you don't get a SyntaxError, try a script that does a raw_input() and prints the repr of the result. A bientot, Armin.

Hi Armin! Armin Rigo wrote: [snip]
One explanation might be that the input string seen is somehow different to what we expect. I can remember a situation (not related to PyPy) where in some terminal using the Backspace key would apparently work, but actually be introduced as characters in the result -- e.g. the string would be '1-\x08+1' if you typed <1><-><backspace><+><1><enter>. Or maybe the string ends in '\r\n' and the tokenizer doesn't recognize the '\r'?
It seems that I had exactly this problem with pypy-c (unfortunately I don't remember on which machine, so I can't reproduce it at the moment): backspace seemed to work but on every line where I used it, I would get an "Unknown character"-error. I'll try to find it again. [snap] Cheers, Carl Friedrich
participants (3)
-
Amaury Forgeot D Arc
-
Armin Rigo
-
Carl Friedrich Bolz