weird behavior

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

weird behavior

astigmatik
I hope you folks are not sick of me already.. But here's something
that is really baffling.

This is from one of my scripts (including the commented lines)

import re
def test(session, data):
  pass
  # temp = re.search('^\:(\S+) \d+ \S+ \:?(.*)$', data)
  # temp.groups()

When I try to run it, I get this error:

C:\JYTHON2.2B1>jython odd.py
Traceback (innermost last):
  (no code object) at line 0
  File "odd.py", line 5
SyntaxError: invalid syntax

Why is it giving me an error when those lines are supposed to be commented out?

Thanks. And I hope somebody replies :-/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: weird behavior

cupdike
Too late for that ;-)

Add a newline at the end of the file.  Without it, it's not
valid syntax for the function dev.

-Clark

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of [hidden email]
> Sent: Tuesday, April 24, 2007 11:30 AM
> To: [hidden email]
> Subject: [Jython-users] weird behavior
>
> I hope you folks are not sick of me already.. But here's
> something that is really baffling.
>
> This is from one of my scripts (including the commented lines)
>
> import re
> def test(session, data):
>   pass
>   # temp = re.search('^\:(\S+) \d+ \S+ \:?(.*)$', data)
>   # temp.groups()
>
> When I try to run it, I get this error:
>
> C:\JYTHON2.2B1>jython odd.py
> Traceback (innermost last):
>   (no code object) at line 0
>   File "odd.py", line 5
> SyntaxError: invalid syntax
>
> Why is it giving me an error when those lines are supposed to
> be commented out?
>
> Thanks. And I hope somebody replies :-/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: weird behavior

Leo User
In reply to this post by astigmatik

--- [hidden email] wrote:

> I hope you folks are not sick of me already.. But
> here's something
> that is really baffling.
>
> This is from one of my scripts (including the
> commented lines)
>
> import re
> def test(session, data):
>   pass
>   # temp = re.search('^\:(\S+) \d+ \S+ \:?(.*)$',
> data)
>   # temp.groups()
>
> When I try to run it, I get this error:
>
> C:\JYTHON2.2B1>jython odd.py
> Traceback (innermost last):
>   (no code object) at line 0
>   File "odd.py", line 5
> SyntaxError: invalid syntax
>
> Why is it giving me an error when those lines are
> supposed to be commented out?
>
> Thanks. And I hope somebody replies :-/
>
>

Im not getting an error on 2.1, 2.2a1, 2.2b1 or
jythonx.  Maybe Im cutting and pasting wrong?

leouser


-------------------------------------------------------------------------

> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
> express and take
> control of your XML. No limits. Just data. Click to
> get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Jython-users mailing list
> [hidden email]
>
https://lists.sourceforge.net/lists/listinfo/jython-users
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: weird behavior

astigmatik
In reply to this post by cupdike
Yeah.. that fixed it.. jython2.2b1, windows xp btw..

On 4/24/07, Updike, Clark <[hidden email]> wrote:
> Too late for that ;-)
>
> Add a newline at the end of the file.  Without it, it's not
> valid syntax for the function dev.
>
> -Clark

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users