The current implementation of jythonc is essentially deprecated in Jython 2.2.  There are some things that just cannot be accomplished well in the current implementation (for example, generators).  There will be a new implementation down the road (based on the normal interactive compiler) but no work has been done on that yet.

-Frank

On 2/2/06, Kevin Whinnery <Kevin.Whinnery@lawson.com> wrote:

Thanks a lot, Brian, that solved my problem - I thought I was taking crazy pills for the better part of a week.  :-)

Did you report that as a bug?  I didn't see that you had to extend a Java class in the Jython documentation or Jython Essentials (maybe I just missed it).

Kevin Whinnery
Associate Software Engineer
E-Mail: Kevin.Whinnery@lawson.com
Phone: (651) 767-6497

Lawson Software
380 St. Peter St.
St. Paul, MN 55102



Brian Corbin <corbinbs@gmail.com>
Sent by: jython-users-admin@lists.sourceforge.net

02/01/2006 04:23 PM

To
Kevin Whinnery <Kevin.Whinnery@lawson.com >
cc
jython-users@lists.sourceforge.net
Subject
Re: [Jython-users] Jythonc not generating public method signatures







Kevin,

    I recently ran into this.  I had to make my Jython class
extend/implement a "Real" Java class in order to get jythonc to expose
the function as a public method in Java.  (I was working with
Jython22a1)

There may be other/better ways to do this, but this worked for me.

Thanks,

Brian

On 2/1/06, Kevin Whinnery <Kevin.Whinnery@lawson.com> wrote:
>
> Hello all,
>
> I am attempting to use the @sig mechanism to make functions I have defined
> in a Python script available to Java:
>
> <code>
>
> def createResponseFile(responseFilePath, destinationPath):
>     "@sig public static void createResponseFile(java.lang.String
> responseFilePath, java.lang.String destinationPath)"
>     # my code follows
>     # ....
>
> </code>
>
> When I run jythonc on this file, this is the Java code that is generated for
> this function in the PyInner class:
>
> <code>
>
> private static PyObject createResponseFile$1(PyFrame frame) {
>             /* @sig public static void createResponseFile(java.lang.String
> responseFilePath, java.lang.String destinationPath) */
>             //my code follows
>             //....
> }
>
> </code>
>
>
> It seems jythonc just thinks this is a comment in my script, and doesn't
> create a public interface to the function I wrote in Python.  Am I doing
> something wrong?  Is there something else I need to do in order to make my
> Python functions callable from Java?  Any help anyone could offer would be
> greatly appreciated...
>
> Kevin Whinnery
>  Associate Software Engineer
>  E-Mail: Kevin.Whinnery@lawson.com
>  Phone: (651) 767-6497
>
>  Lawson Software
>  380 St. Peter St.
>  St. Paul, MN 55102


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users