From: Brad C. <bc...@vi...> - 2002-03-19 20:28:15
|
At 8:32 PM +0100 3/19/02, Ype Kingma wrote: >I'm beginning to suspect that the java stdio implementation on >macosx is the culprit. You shouldn't be getting EOF. > >Can you use triple quotes on a single line? ("""Hello world""") >If you can't there is a bug in your jython implementation. > >Can you run a .py file with some triple quotes in it? Ie. I get exactly the same behavior on both MacOSX and and Redhat 7.0 Linux (via ssh from MacOSX terminal) . Both are running the same jython-1.2.class image, downloaded this AM from the jython website. On Linux (Redhat 7.0) with IBM JDK [bcox@linux:~]$ jython hello.py Hello world Hello world Helloworld [bcox@linux:~]$ cat hello.py print """Hello world"""; print """Hello world""" print "Hello\ world" [bcox@linux:~]$ jython Jython 2.1 on java1.3.0 (JIT: jitc) Type "copyright", "credits" or "license" for more information. >>> print """Hello world"""; Hello world >>> print """Hello Traceback (innermost last): (no code object) at line 0 File "<console>", line 2 SyntaxError: Lexical error at line 2, column 0. Encountered: <EOF> after : "" >>> print "Hello\ Traceback (innermost last): (no code object) at line 0 File "<console>", line 2 SyntaxError: Lexical error at line 2, column 0. Encountered: <EOF> after : "" >>> On MacOSX 10.1.1 (I think; the latest release) [bcox@g3mac:/b2/Applications/jython-2.1]$ !jy jython Jython 2.1 on java1.3.1 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> print """Hello world""" Hello world >>> print """Hello Traceback (innermost last): (no code object) at line 0 File "<console>", line 2 SyntaxError: Lexical error at line 2, column 0. Encountered: <EOF> after : "" >>> print "Hello\ Traceback (innermost last): (no code object) at line 0 File "<console>", line 2 SyntaxError: Lexical error at line 2, column 0. Encountered: <EOF> after : "" >>> [bcox@g3mac:~]$ jython hello.py Hello world Hello world Helloworld [bcox@g3mac:~]$ -- Brad Cox, PhD; bc...@vi... 703 361 4751 o For industrial age goods there were checks and credit cards. For everything else there is http://virtualschool.edu/mybank o Java Interactive Learning Environment http://virtualschool.edu/jile o Java Web Application Architecture: http://virtualschool.edu/jwaa |