Tobias -
Thank you very much - changing the package name to adampkg allowed me to successfully use 'from adampkg import Adam;'.
 
Alan -
Thank you as well for clarifying that Jython has it's own JVM based implementation of Python 2.5.  I assumed it was using my installed 3.0.1 Python version but now understand that it is not using that at all.  This helped me to make sense of some syntactical changes I was having to make when converting existing standard .py files to Jython.
 
Thanks again for you quick assistance on this,
Adam M.


From: Tobias Ivarsson [mailto:thobes@gmail.com]
Sent: Thursday, February 19, 2009 12:24 PM
To: Alan Kennedy; Mollenkopf, Adam
Cc: jython-users@lists.sourceforge.net
Subject: Re: [Jython-users] Trouble Invoking Simple Custom Java object from Python in Py 3.0.1

If you _are_ running Jython it looks like your problem is a name conflict, both your python module and java package have the same name. Jython will import the python module first in this case (the very same module that you are running), and this module does not define anything with the same name as the java class you are trying to access.

On Thu, Feb 19, 2009 at 4:05 PM, Alan Kennedy <jython-dev@xhaus.com> wrote:
[Adam]
> I am having trouble getting Jython to execute a very simple custom java class.
[.. snip ..]
> I am running Python 3.0.1.

Are you running jython or are you running python 3.0.1? The two are
fundamentally different.

The only version of python that is at version 3.0.1 is cpython, which
is implemented in C, and cannot be used to run java libraries (well,
not easily anyway).

Jython is a different implementation of the python language that runs
on the Java Virtual Machine, and is just reaching version 2.5; version
3.0 of jython is some way in the future.

If you can clarify which version you are using, it may be possible to
resolve your problem.

Alan.

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