from and with keywords

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

from and with keywords

Hello,

Ive 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?  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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Leo Soto M. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 27, 2009 at 1:05 PM,  <john.m.baker@...> wrote:

> 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'

That likely mean that you added spaces in the line before typing "from".

> Is ‘from’ not supported in Jython?  Is ‘with’ supported?

Both are supported and work well :-)
--
Leo Soto M.
http://blog.leosoto.com

------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Sébastien Boisgérault-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

john.m.baker@... a écrit :
from and with keywords

Hello,

Ive 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:

------------------------------------------------------------------------------ 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@... https://lists.sourceforge.net/lists/listinfo/jython-users


------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
from and with keywords

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@...]
Sent: 27 October 2009 17:10
To: Baker, John (IT/UK)
Cc: jython-users@...
Subject: Re: [Jython-users] from and with keywords

 

john.m.baker@... 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:

 


 
------------------------------------------------------------------------------
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@...
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

------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Leo Soto M. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 27, 2009 at 2:12 PM,  <john.m.baker@...> wrote:
> Hello,
> I used Jython 2.5.1 and there are no spaces before from...  the modules also
> load correctly in Python.

Perhaps you have some weird bytes at the start of the file? The error
says "line 2".

Perhaps some bogus Unicode BOM?
--
Leo Soto M.
http://blog.leosoto.com

------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Line 1 had a #!/usr/bin/python, so I've removed it and it still fails:

  File "<string>", line 1
    from __future__ import with_statement
    ^
SyntaxError: no viable alternative at input 'from'

There are no spaces before from.

Can I turn on some extra debugging to get more useful debug?  Or does anyone know the answer?  I'm using Jythin 2.5.1.

Thanks


John

> -----Original Message-----
> From: Leo Soto M. [mailto:leo.soto@...]
> Sent: 27 October 2009 17:42
> To: Baker, John (IT/UK)
> Cc: Sebastien.Boisgerault@...; jython-
> users@...
> Subject: Re: [Jython-users] from and with keywords
>
> On Tue, Oct 27, 2009 at 2:12 PM,  <john.m.baker@...> wrote:
> > Hello,
> > I used Jython 2.5.1 and there are no spaces before from...  the
> modules also
> > load correctly in Python.
>
> Perhaps you have some weird bytes at the start of the file? The error
> says "line 2".
>
> Perhaps some bogus Unicode BOM?
> --
> Leo Soto M.
> http://blog.leosoto.com



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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

If it helps, I've removed the from so the next line is an import:

  File "<string>", line 1
    import getopt, os, pwd, sys
    ^
SyntaxError: no viable alternative at input 'import'


John

> -----Original Message-----
> From: Leo Soto M. [mailto:leo.soto@...]
> Sent: 27 October 2009 17:42
> To: Baker, John (IT/UK)
> Cc: Sebastien.Boisgerault@...; jython-
> users@...
> Subject: Re: [Jython-users] from and with keywords
>
> On Tue, Oct 27, 2009 at 2:12 PM,  <john.m.baker@...> wrote:
> > Hello,
> > I used Jython 2.5.1 and there are no spaces before from...  the
> modules also
> > load correctly in Python.
>
> Perhaps you have some weird bytes at the start of the file? The error
> says "line 2".
>
> Perhaps some bogus Unicode BOM?
> --
> Leo Soto M.
> http://blog.leosoto.com



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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've copied the jython.jar file into my project but I guess I need the Lib directory too?  Does it go on the classpath?  Does Jython look in the current working directory?

> -----Original Message-----
> From: Baker, John (IT/UK)
> Sent: 30 October 2009 17:20
> To: leo.soto@...
> Cc: jython-users@...
> Subject: Re: [Jython-users] from and with keywords
>
> Hi,
>
> If it helps, I've removed the from so the next line is an import:
>
>   File "<string>", line 1
>     import getopt, os, pwd, sys
>     ^
> SyntaxError: no viable alternative at input 'import'
>
>
> John
>
> > -----Original Message-----
> > From: Leo Soto M. [mailto:leo.soto@...]
> > Sent: 27 October 2009 17:42
> > To: Baker, John (IT/UK)
> > Cc: Sebastien.Boisgerault@...; jython-
> > users@...
> > Subject: Re: [Jython-users] from and with keywords
> >
> > On Tue, Oct 27, 2009 at 2:12 PM,  <john.m.baker@...> wrote:
> > > Hello,
> > > I used Jython 2.5.1 and there are no spaces before from...  the
> > modules also
> > > load correctly in Python.
> >
> > Perhaps you have some weird bytes at the start of the file? The error
> > says "line 2".
> >
> > Perhaps some bogus Unicode BOM?
> > --
> > Leo Soto M.
> > http://blog.leosoto.com
>
>
>
> 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@...
> 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

------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Daniel Baktiar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi John,

Could you elaborate more on how you install Jython on your environment?
The first line looks like you are invoking jython from your default CPython instead of Jython.
The line 1: #!/usr/bin/python

Could you invoke Jython from your shell/command prompt with that setting?

Regards,
Daniel

2009/10/31 <john.m.baker@...>
I've copied the jython.jar file into my project but I guess I need the Lib directory too?  Does it go on the classpath?  Does Jython look in the current working directory?



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@...
https://lists.sourceforge.net/lists/listinfo/jython-users



--
Daniel Baktiar - JEEwish & Pythoneer
(http://dbaktiar.wordpress.com)

------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello,

 

I unzipped the jython package and I can run the jython jar using java –jar jython.jar.  The interpreter works fine.

 

What the instructions lack is how to copy the jython jar and resources elsewhere.  I don’t want to ship the entire jython zip file with my project; I want to place the relevant parts into a war file.

 

The #!/usr/bin/python is irrelevant – it’s there because the script has it, but it still doesn’t work without it.

 

The answer seems to lie in the lib directory – could you tell me how Jython loads resources from it?

 

Thanks,

 


John

 

From: Daniel Baktiar [mailto:dbaktiar@...]
Sent: 02 November 2009 05:28
To: jython-users@...
Subject: Re: [Jython-users] from and with keywords

 

Hi John,

 

Could you elaborate more on how you install Jython on your environment?

The first line looks like you are invoking jython from your default CPython instead of Jython.

The line 1: #!/usr/bin/python

 

Could you invoke Jython from your shell/command prompt with that setting?

 

Regards,

Daniel

2009/10/31 <john.m.baker@...>

I've copied the jython.jar file into my project but I guess I need the Lib directory too?  Does it go on the classpath?  Does Jython look in the current working directory?



 



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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Jason R Briggs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you're deploying in a war, then stick the Lib directory in the "classes" dir (for example), and then point the python path at that directory with something vaguely like:

Properties props = new Properties();
String jythonPath = libDir.getFile().getCanonicalPath();
props.put("python.path", jythonPath);
PythonInterpreter.initialize(System.getProperties(), props, null);

In my case, "libDir" is a prop injected by spring:

<property name="libDir" value="classpath:Lib" />

So you'll need to grab the canonical path according to whatever framework you're working within.

Dunno if that helps?

J

On Mon, Nov 2, 2009 at 8:40 AM, <john.m.baker@...> wrote:

Hello,

 

I unzipped the jython package and I can run the jython jar using java –jar jython.jar.  The interpreter works fine.

 

What the instructions lack is how to copy the jython jar and resources elsewhere.  I don’t want to ship the entire jython zip file with my project; I want to place the relevant parts into a war file.

 

The #!/usr/bin/python is irrelevant – it’s there because the script has it, but it still doesn’t work without it.

 

The answer seems to lie in the lib directory – could you tell me how Jython loads resources from it?

 

Thanks,

 


John

 

From: Daniel Baktiar [mailto:dbaktiar@...]
Sent: 02 November 2009 05:28
To: jython-users@...


Subject: Re: [Jython-users] from and with keywords

 

Hi John,

 

Could you elaborate more on how you install Jython on your environment?

The first line looks like you are invoking jython from your default CPython instead of Jython.

The line 1: #!/usr/bin/python

 

Could you invoke Jython from your shell/command prompt with that setting?

 

Regards,

Daniel

2009/10/31 <john.m.baker@...>

I've copied the jython.jar file into my project but I guess I need the Lib directory too?  Does it go on the classpath?  Does Jython look in the current working directory?



 



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:

------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users



------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Parent Message unknown Re: from and with keywords

by Jason R Briggs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes you can (but that means you can only use java libraries, rather than python modules).  However your question was where to put resources -- and that's how I do it... ;-)

If you need to use the __future__ mod, you'll need to bundle the Lib dir.

On Mon, Nov 2, 2009 at 9:24 AM, <john.m.baker@...> wrote:

Surely we can deploy the standalone jar and nothing else?

 

From: Jason R Briggs [mailto:jasonrbriggs@...]
Sent: 02 November 2009 09:22
To: Baker, John (IT/UK); jython-users@...


Subject: Re: [Jython-users] from and with keywords

 

If you're deploying in a war, then stick the Lib directory in the "classes" dir (for example), and then point the python path at that directory with something vaguely like:

Properties props = new Properties();
String jythonPath = libDir.getFile().getCanonicalPath();
props.put("python.path", jythonPath);
PythonInterpreter.initialize(System.getProperties(), props, null);

In my case, "libDir" is a prop injected by spring:

<property name="libDir" value="classpath:Lib" />

So you'll need to grab the canonical path according to whatever framework you're working within.

Dunno if that helps?

J

On Mon, Nov 2, 2009 at 8:40 AM, <john.m.baker@...> wrote:

Hello,

 

I unzipped the jython package and I can run the jython jar using java –jar jython.jar.  The interpreter works fine.

 

What the instructions lack is how to copy the jython jar and resources elsewhere.  I don’t want to ship the entire jython zip file with my project; I want to place the relevant parts into a war file.

 

The #!/usr/bin/python is irrelevant – it’s there because the script has it, but it still doesn’t work without it.

 

The answer seems to lie in the lib directory – could you tell me how Jython loads resources from it?

 

Thanks,

 


John



------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I’m confused. J  So, what’s the difference between the Java libraries and the Python modules?  My understanding was that Jython makes use of the Python modules, shipped in the Lib directory.  And, my problem was that the Lib directory wasn’t in the jar hence the jar wasn’t portable (i.e. I couldn’t put it in a web app and use it). 

 

You seem to be suggesting that I can use the jar without the Lib directory bundled within it, and some other set of external modules?

 

From: Jason R Briggs [mailto:jasonrbriggs@...]
Sent: 02 November 2009 09:49
To: Baker, John (IT/UK); jython-users@...
Subject: Re: [Jython-users] from and with keywords

 

Yes you can (but that means you can only use java libraries, rather than python modules).  However your question was where to put resources -- and that's how I do it... ;-)

If you need to use the __future__ mod, you'll need to bundle the Lib dir.

On Mon, Nov 2, 2009 at 9:24 AM, <john.m.baker@...> wrote:

Surely we can deploy the standalone jar and nothing else?

 

From: Jason R Briggs [mailto:jasonrbriggs@...]
Sent: 02 November 2009 09:22
To: Baker, John (IT/UK); jython-users@...


Subject: Re: [Jython-users] from and with keywords

 

If you're deploying in a war, then stick the Lib directory in the "classes" dir (for example), and then point the python path at that directory with something vaguely like:

Properties props = new Properties();
String jythonPath = libDir.getFile().getCanonicalPath();
props.put("python.path", jythonPath);
PythonInterpreter.initialize(System.getProperties(), props, null);

In my case, "libDir" is a prop injected by spring:

<property name="libDir" value="classpath:Lib" />

So you'll need to grab the canonical path according to whatever framework you're working within.

Dunno if that helps?

J

On Mon, Nov 2, 2009 at 8:40 AM, <john.m.baker@...> wrote:

Hello,

 

I unzipped the jython package and I can run the jython jar using java –jar jython.jar.  The interpreter works fine.

 

What the instructions lack is how to copy the jython jar and resources elsewhere.  I don’t want to ship the entire jython zip file with my project; I want to place the relevant parts into a war file.

 

The #!/usr/bin/python is irrelevant – it’s there because the script has it, but it still doesn’t work without it.

 

The answer seems to lie in the lib directory – could you tell me how Jython loads resources from it?

 

Thanks,

 


John

 

Category:



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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Alex Grönholm-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jason R Briggs kirjoitti:

> If you're deploying in a war, then stick the Lib directory in the
> "classes" dir (for example), and then point the python path at that
> directory with something vaguely like:
>
> Properties props = new Properties();
> String jythonPath = libDir.getFile().getCanonicalPath();
> props.put("python.path", jythonPath);
> PythonInterpreter.initialize(System.getProperties(), props, null);
>
> In my case, "libDir" is a prop injected by spring:
>
> <property name="libDir" value="classpath:Lib" />
>
> So you'll need to grab the canonical path according to whatever
> framework you're working within.
>
> Dunno if that helps?
>
> J
>
> On Mon, Nov 2, 2009 at 8:40 AM, <john.m.baker@...
> <mailto:john.m.baker@...>> wrote:
>
>     Hello,
>
>      
>
>     I unzipped the jython package and I can run the jython jar using
>     java –jar jython.jar.  The interpreter works fine.
>
>      
>
>     What the instructions lack is how to copy the jython jar and
>     resources elsewhere.  I don’t want to ship the entire jython zip
>     file with my project; I want to place the relevant parts into a
>     war file.
>
>      
>
>     The #!/usr/bin/python is irrelevant – it’s there because the
>     script has it, but it still doesn’t work without it.
>
>      
>
>     The answer seems to lie in the lib directory – could you tell me
>     how Jython loads resources from it?
>
>      
>
>     Thanks,
>
>      
>
>
>     John
>
>      
>
>     *From:* Daniel Baktiar [mailto:dbaktiar@...
>     <mailto:dbaktiar@...>]
>     *Sent:* 02 November 2009 05:28
>     *To:* jython-users@...
>     <mailto:jython-users@...>
>
>     *Subject:* Re: [Jython-users] from and with keywords
>
>      
>
>     Hi John,
>
>      
>
>     Could you elaborate more on how you install Jython on your
>     environment?
>
>     The first line looks like you are invoking jython from your
>     default CPython instead of Jython.
>
>     The line 1: #!/usr/bin/python
>
>      
>
>     Could you invoke Jython from your shell/command prompt with that
>     setting?
>
>      
>
>     Regards,
>
>     Daniel
>
>     2009/10/31 <john.m.baker@... <mailto:john.m.baker@...>>
>
>     I've copied the jython.jar file into my project but I guess I need
>     the Lib directory too?  Does it go on the classpath?  Does Jython
>     look in the current working directory?
>
>
>
>      
>
>
>
>     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@...
>     <mailto:Jython-users@...>
>     https://lists.sourceforge.net/lists/listinfo/jython-users
>
>
> *Use caution:*
> Category:
> More info >>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 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@...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>  


------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Jason,

 

If I have my own library, that I’d usually point at through a .pth file in the site-packages directory, should I point to it through the python.path environment var?

 

I’ve just tried using the code sample below and it failed...

 

 

john

 

From: Jason R Briggs [mailto:jasonrbriggs@...]
Sent: 02 November 2009 09:22
To: Baker, John (IT/UK); jython-users@...
Subject: Re: [Jython-users] from and with keywords

 

If you're deploying in a war, then stick the Lib directory in the "classes" dir (for example), and then point the python path at that directory with something vaguely like:

Properties props = new Properties();
String jythonPath = libDir.getFile().getCanonicalPath();
props.put("python.path", jythonPath);
PythonInterpreter.initialize(System.getProperties(), props, null);

In my case, "libDir" is a prop injected by spring:

<property name="libDir" value="classpath:Lib" />

So you'll need to grab the canonical path according to whatever framework you're working within.

Dunno if that helps?

J



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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Jason R Briggs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think not.  But I'm not sure how the site-packages stuff will work when
you're deploying in a war file.  If the war file is exploded it -should-
be fine, but I personally haven't needed to add anything to site-packages.

Is there a reason you can't add your library as a part of your main
scripts directory?

> Jason,
>
>
>
> If I have my own library, that I'd usually point at through a .pth file
> in the site-packages directory, should I point to it through the
> python.path environment var?
>
>
>
> I've just tried using the code sample below and it failed...
>
>
>
>
>
> john
>
>
>
> From: Jason R Briggs [mailto:jasonrbriggs@...]
> Sent: 02 November 2009 09:22
> To: Baker, John (IT/UK); jython-users@...
> Subject: Re: [Jython-users] from and with keywords
>
>
>
> If you're deploying in a war, then stick the Lib directory in the
> "classes" dir (for example), and then point the python path at that
> directory with something vaguely like:
>
> Properties props = new Properties();
> String jythonPath = libDir.getFile().getCanonicalPath();
> props.put("python.path", jythonPath);
> PythonInterpreter.initialize(System.getProperties(), props, null);
>
> In my case, "libDir" is a prop injected by spring:
>
> <property name="libDir" value="classpath:Lib" />
>
> So you'll need to grab the canonical path according to whatever
> framework you're working within.
>
> Dunno if that helps?
>
> J
>
>


------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jason,

Well I'd prefer to use the jar which contains the Lib directory, and I
can't believe Jython doesn't support site-packages?  Surely many people
deploy custom packages?

My reason for preferring to use the full jar containing Lib is to make
deployment as clean as possible, especially when upgrading jython in the
future.  

John

> -----Original Message-----
> From: Jason R Briggs [mailto:jasonrbriggs@...]
> Sent: 02 November 2009 12:18
> To: Baker, John (IT/UK)
> Cc: jython-users@...
> Subject: RE: [Jython-users] from and with keywords
>
> I think not.  But I'm not sure how the site-packages stuff will work
> when
> you're deploying in a war file.  If the war file is exploded it -
> should-
> be fine, but I personally haven't needed to add anything to site-
> packages.
>
> Is there a reason you can't add your library as a part of your main
> scripts directory?




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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Alex Grönholm-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

john.m.baker@... kirjoitti:
> Jason,
>
> Well I'd prefer to use the jar which contains the Lib directory, and I
> can't believe Jython doesn't support site-packages?  Surely many people
> deploy custom packages?
>
>  
Jython looks for packages on the class path. If you deploy a war file on
tomcat or any java ee webserver, you can just put any custom packages in
a jar or anywhere else on the class path. Jython will find your packages
as long as they are on the classpath.

> My reason for preferring to use the full jar containing Lib is to make
> deployment as clean as possible, especially when upgrading jython in the
> future.  
>
> John
>
>  
>> -----Original Message-----
>> From: Jason R Briggs [mailto:jasonrbriggs@...]
>> Sent: 02 November 2009 12:18
>> To: Baker, John (IT/UK)
>> Cc: jython-users@...
>> Subject: RE: [Jython-users] from and with keywords
>>
>> I think not.  But I'm not sure how the site-packages stuff will work
>> when
>> you're deploying in a war file.  If the war file is exploded it -
>> should-
>> be fine, but I personally haven't needed to add anything to site-
>> packages.
>>
>> Is there a reason you can't add your library as a part of your main
>> scripts directory?
>>    
>
>
>
>
> 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@...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>  


------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by john.m.baker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

That's great.  What's python.path do when set as an environment var?


John

> -----Original Message-----
> From: Alex Grönholm [mailto:alex.gronholm@...]
> Sent: 03 November 2009 10:25
> To: jython-users@...
> Subject: Re: [Jython-users] from and with keywords
>
> john.m.baker@... kirjoitti:
> > Jason,
> >
> > Well I'd prefer to use the jar which contains the Lib directory, and
> I
> > can't believe Jython doesn't support site-packages?  Surely many
> people
> > deploy custom packages?
> >
> >
> Jython looks for packages on the class path. If you deploy a war file
> on
> tomcat or any java ee webserver, you can just put any custom packages
> in
> a jar or anywhere else on the class path. Jython will find your
> packages
> as long as they are on the classpath.
> > My reason for preferring to use the full jar containing Lib is to
> make
> > deployment as clean as possible, especially when upgrading jython in
> the
> > future.
> >
> > John
> >
> >
> >> -----Original Message-----
> >> From: Jason R Briggs [mailto:jasonrbriggs@...]
> >> Sent: 02 November 2009 12:18
> >> To: Baker, John (IT/UK)
> >> Cc: jython-users@...
> >> Subject: RE: [Jython-users] from and with keywords
> >>
> >> I think not.  But I'm not sure how the site-packages stuff will work
> >> when
> >> you're deploying in a war file.  If the war file is exploded it -
> >> should-
> >> be fine, but I personally haven't needed to add anything to site-
> >> packages.
> >>
> >> Is there a reason you can't add your library as a part of your main
> >> scripts directory?
> >>
> >
> >
> >
> >
> > 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@...
> > https://lists.sourceforge.net/lists/listinfo/jython-users
> >
>
>
> -----------------------------------------------------------------------
> -------
> 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@...
> 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


------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users

Re: from and with keywords

by Jason R Briggs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think you might've misunderstood me.  You *can* use a jar with the Lib
dir, and as far as I'm aware site-packages is supported (someone else
might be able to confirm).  All I'm saying is when you bundle it inside a
war file, I'm not sure how the .pth stuff will work.

Regarding site-packages, I was more questioning the necessity of using it.
 That dir is used when you're providing site-wide extensions for a Python
installation.  In this case you're bundling jython inside a war (so it
doesn't really fit the definition of "site-wide") so you could probably
get away with including the module dir in whatever dir you're storing your
main jython scripts.  If that makes sense...?

> Jason,
>
> Well I'd prefer to use the jar which contains the Lib directory, and I
> can't believe Jython doesn't support site-packages?  Surely many people
> deploy custom packages?
>
> My reason for preferring to use the full jar containing Lib is to make
> deployment as clean as possible, especially when upgrading jython in the
> future.
>
> John
>
>> -----Original Message-----
>> From: Jason R Briggs [mailto:jasonrbriggs@...]
>> Sent: 02 November 2009 12:18
>> To: Baker, John (IT/UK)
>> Cc: jython-users@...
>> Subject: RE: [Jython-users] from and with keywords
>>
>> I think not.  But I'm not sure how the site-packages stuff will work
>> when
>> you're deploying in a war file.  If the war file is exploded it -
>> should-
>> be fine, but I personally haven't needed to add anything to site-
>> packages.
>>
>> Is there a reason you can't add your library as a part of your main
>> scripts directory?
>
>
>
>
> 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@...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>


------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/jython-users
< Prev | 1 - 2 | Next >