Andrea | 1 Mar 19:54

Re: looking for jython tutorial for importing non-standard library java class

Andrea wrote:
> 
> import sys
> sys.path.append('/home/andrea/foo/jython/andrea.jar')
> import org
> t=org.foo.Test()
> print t
> print t.print()
> 

I've tried

import org.foo.Test
>>>> ImportError: No module named foo

import org.foo
>>>> ImportError: No module named foo

from org.foo import Test
>>>> ImportError: No module named foo

But I've discovered that if I use a different name org->com it works.
Originally I thought that the first part of the package had to be a new name, but now I have a
different view

If, at that point (with "org", after the above errors), I do "import xyz" I get

>>> import xyz
*sys-package-mgr*: processing new jar, '/home/andrea/foo/jython/andrea.jar')
Traceback (most recent call last):
(Continue reading)

Frank Wierzbicki | 1 Mar 20:20
Picon
Gravatar

Re: looking for jython tutorial for importing non-standard library java class

Hi Andrea,

This is a known bug in Jython 2.5b1 which has been fixed on trunk,
sorry I didn't recognize it when you first posted it.  Details are
here: http://bugs.jython.org/issue1239.  I plan to get another beta
out at the end of the coming week.

-Frank

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
Andrea | 1 Mar 21:24

Re: looking for jython tutorial for importing non-standard library java class

Frank Wierzbicki wrote:
> Hi Andrea,
> 
> This is a known bug in Jython 2.5b1 which has been fixed on trunk,
> sorry I didn't recognize it when you first posted it.  Details are
> here: http://bugs.jython.org/issue1239.  I plan to get another beta
> out at the end of the coming week.
> 
> -Frank

Best news since I joined the mailing list!
Look forward to a new beta.

Since we are here, I'd like to ask your opinion on my other issue about
Jython-JNI which I have posted on 24-02-09.

Thanks

Andrea

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
Robert Andre | 2 Mar 21:52
Favicon

__getattr__

What is the proper way of implementing __getattr__, __setattr__, __getitem, 
__setitem__ functionality from a java class?  Does it require extending 
PyObject and would this be compatible for both 2.2 and 2.5?

thanks,

Rob Andre

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
유진승 | 3 Mar 11:34
Picon

Starting Jython

Hi.
 
I am a beginner of Jython.
I have installed it alright, but am having difficulty starting it.
I presume the standard way to start Jython is to type "jython" at C: prompt.
First of all, my dos prompt is not exactly C: but C:\Documents and Settings\Jin>
and I can't bring it back to simple C:\
I typed C:\ at the end but this didn't work (I would appreciate if someone can show me how).
But this may not be a problem because I can start Python by typing python here.
 
Anyway, I typed "jython" here and then got a message that jython is not an executable program.
I looked at the jython folder (jython2.2.1) and saw no file with .exe.
I also typed in different combinations like "C:\jython", "C:\jython>jython" but got the s ame message.
 
I would really appreciate if someone can get me out of this puddle.
Thank you very much.

(I am actually sendint this message a second time because my first question was not accepted due to my non-membership. I have now confirmed my mailing subscription and joined the Sourceforge, so I am sending it again hoping that it is not accepted.)

페이지 이동없는 편리한 무제한 스크롤링, 지금 라이브 검색을 체험해보세요.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Picon

Re: Starting Jython

Hello

To get C:\ as prompt, just:

cd \

then you can cd to the place where you installed jython:

cd jython2.2.1

and start jython:

jython

You may also consider other alternatives, like using netbeans
http://www.netbeans.org/features/python/ It depends on what you are
looking for...

El mar, 03-03-2009 a las 19:34 +0900, 유진승 escribió:
> Hi. 
>  
> I am a beginner of Jython. 
> I have installed it alright, but am having difficulty starting it. 
> I presume the standard way to start Jython is to type "jython" at C:
> prompt. 
> First of all, my dos prompt is not exactly C: but C:\Documents and
> Settings\Jin> 
> and I can't bring it back to simple C:\ 
> I typed C:\ at the end but this didn't work (I would appreciate if
> someone can show me how). 
> But this may not be a problem because I can start Python by typing
> python here. 
>  
> Anyway, I typed "jython" here and then got a message that jython is
> not an executable program. 
> I looked at the jython folder (jython2.2.1) and saw no file
> with .exe. 
> I also typed in different combinations like "C:\jython", "C:
> \jython>jython" but got the same message.
>  
> I would really appreciate if someone can get me out of this puddle. 
> Thank you very much. 
> 
> (I am actually sendint this message a second time because my first
> question was not accepted due to my non-membership. I have now
> confirmed my mailing subscription and joined the Sourceforge, so I am
> sending it again hoping that it is not accepted.) 

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Leo Soto M. | 3 Mar 17:11
Picon
Gravatar

Re: __getattr__

On Mon, Mar 2, 2009 at 5:52 PM, Robert Andre <randre <at> pppl.gov> wrote:
> What is the proper way of implementing __getattr__, __setattr__, __getitem,
> __setitem__ functionality from a java class?  Does it require extending
> PyObject and would this be compatible for both 2.2 and 2.5?

In case you take the "extending PyObject" route,
<http://wiki.python.org/jython/JythonDeveloperGuide/AttributeLookupMethods>
explain how to solve the __getattr__ case.
--

-- 
Leo Soto M.
http://blog.leosoto.com

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Robert Andre | 3 Mar 21:27
Favicon

Re: __getattr__

Thanks, this is helpful.  I guess I'll be extending PyObject but it sure would 
be nice if this could be done by implementing __getattr__ in the java class.

Rob Andre

On Tuesday 03 March 2009 11:11, Leo Soto M. wrote:
> On Mon, Mar 2, 2009 at 5:52 PM, Robert Andre <randre <at> pppl.gov> wrote:
> > What is the proper way of implementing __getattr__, __setattr__,
> > __getitem, __setitem__ functionality from a java class?  Does it require
> > extending PyObject and would this be compatible for both 2.2 and 2.5?
>
> In case you take the "extending PyObject" route,
> <http://wiki.python.org/jython/JythonDeveloperGuide/AttributeLookupMethods>
> explain how to solve the __getattr__ case.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
David Bush | 4 Mar 21:55

Re: Python libraries

ok thanks all for the replies. probably the wrong place to ask, but would maybe jepp help me here?

On Mon, Feb 23, 2009 at 9:08 PM, Marc Downie <marc <at> openendedgroup.com> wrote:
One thing to note is that if it's you thats doing the SWIG wrapping of
this 3rd party package (or you can wrestle the .i files from that 3rd
party) then your best bet would be to have SWIG produce Java bindings
for the dll and then use those in Jython.

We've done the equivalent of this occasionally and, like everything
involving SWIG, it is either completely painless or the complete
opposite.

best,

Marc.

On Sat, Feb 21, 2009 at 1:57 PM, David Bush <davidbush4 <at> googlemail.com> wrote:
> Hi everyone.
>
> I am trying to embed a python script into java. This script imports a 3rd
> party package which has a component in the Lib folder of python which i can
> place in my jython folder so that jython can see it, but this component
> imports a .dll file from the DLL folder, which i believe jython cannot
> interact with. This 3rd party package is generated from SWIG
> (http://www.swig.org). So effectively I have python wrapped around a c++
> program. Does this mean the method of embedding python code into java via
> jython is unavailable to me due to the module being a dll file?
>
> Thanks for any help.
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Jython-users mailing list
> Jython-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jython-users
>
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Frank Wierzbicki | 5 Mar 20:01
Picon
Gravatar

jline enhancement requests

Hi all,

Sorry for the cross-post, but I couldn't decide if this was more of a
user or a dev query...

Anyway, Charlie Nutter of JRuby is part of a JLine
(http://jline.sourceforge.net/) revival, and I wanted to know if
anyone here had any feature requests for JLine.  I remember we had a
start on iPython support (http://ipython.scipy.org/moin/), but needed
some extra readline features -- if anyone knows about that, I'd
especially like to know what we are missing to support that project.

Thanks,

-Frank

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

Gmane