Hello,

 

I used Jython 2.5.1 and there are no spaces before from...  the modules also load correctly in Python.

 

 

John

 

From: Sébastien Boisgérault [mailto:Sebastien.Boisgerault@mines-paristech.fr]
Sent: 27 October 2009 17:10
To: Baker, John (IT/UK)
Cc: jython-users@lists.sourceforge.net
Subject: Re: [Jython-users] from and with keywords

 

john.m.baker@nomura.com a écrit :

Hello,

I’ve written a set of Python scripts around Python 2.5.4 and have made use of the ‘with’ keyword.  Consider the following:

#!/usr/bin/python

from __future__ import with_statement # This isn't required in Python 2.6

When I attempt to load the script in Jython, I get the following error:

  File "<string>", line 2

    from __future__ import with_statement # This isn't required in Python 2.6

    ^

SyntaxError: no viable alternative at input 'from'

Is ‘from’ not supported in Jython? 

Your script works just fine for me. Did you use Jython 2.5 ?


Is ‘with’ supported?

Thanks,

 

John

 

This e-mail (including any attachments) is confidential, may contain

proprietary or privileged information and is intended for the named

recipient(s) only. Unintended recipients are prohibited from taking action

on the basis of information in this e-mail and must delete all copies.

Nomura will not accept responsibility or liability for the accuracy or

completeness of, or the presence of any virus or disabling code in, this

e-mail. If verification is sought please request a hard copy. Any reference

to the terms of executed transactions should be treated as preliminary only

and subject to formal written confirmation by Nomura. Nomura reserves the

right to monitor e-mail communications through its networks (in accordance

with applicable laws). No confidentiality or privilege is waived or lost by

Nomura by any mistransmission of this e-mail. Any reference to "Nomura" is

a reference to any entity in the Nomura Holdings, Inc. group. Please read

our Electronic Communications Legal Notice which forms part of this e-mail:

http://www.Nomura.com/email_disclaimer.htm

 


 
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
 


 
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
  

 



This e-mail (including any attachments) is confidential, may contain
proprietary or privileged information and is intended for the named
recipient(s) only. Unintended recipients are prohibited from taking action
on the basis of information in this e-mail and must delete all copies.
Nomura will not accept responsibility or liability for the accuracy or
completeness of, or the presence of any virus or disabling code in, this
e-mail. If verification is sought please request a hard copy. Any reference
to the terms of executed transactions should be treated as preliminary only
and subject to formal written confirmation by Nomura. Nomura reserves the
right to monitor e-mail communications through its networks (in accordance
with applicable laws). No confidentiality or privilege is waived or lost by
Nomura by any mistransmission of this e-mail. Any reference to "Nomura" is
a reference to any entity in the Nomura Holdings, Inc. group. Please read
our Electronic Communications Legal Notice which forms part of this e-mail:
http://www.Nomura.com/email_disclaimer.htm