#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2005
    Posts
    3
    Rep Power
    0

    Embedding Java in Python


    So I'm working under a few limitations here: our product is working currently under Python 2.3 and I don't have the option to use Jython at all. I have a third party product that is available with Java, C++ and .NET apis and I've been a Java developer in a past incarnation, so I'd like to use that option.

    Am I just out of luck? I found ways to wrapper C/C++ code in Python, but nothing of the like for Java.

    thanks in advance,
    jd
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    Wait, why can't you use Jython? Explain.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Take a look at http://jpype.sourceforge.net/]Jpype - it may do what you want. It lets you call Java code from Python.

    There is also PythonNet, which does the same for .NET.

    If the C/C++ code is in a DLL, you may be able to call it directly with ctypes.

    Dave - The Developers' Coach
    Last edited by DevCoach; September 27th, 2005 at 02:33 AM. Reason: typo
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2005
    Posts
    3
    Rep Power
    0
    Originally Posted by †Yegg†
    Wait, why can't you use Jython? Explain.
    Well, simply put, changing to Jython from 2.3 isn't a risk I'm interested in undertaking at this point in the release cycle. The Jython site seems to suggest that the latest version incorporates feature support for 2.1 and 2.2, but makes no mention of 2.3 or forward.
  8. #5
  9. A wanna-be guru of some sort
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2004
    Location
    Either online or offline
    Posts
    625
    Rep Power
    20
    Jython will have a new release. It was selected as one of the grants given by PSF in 2004. Don't give up on Jython just yet. Jython Grant Proposal
    Last edited by Boki; September 27th, 2005 at 11:23 AM.
    Am I supposed to sign here?

IMN logo majestic logo threadwatch logo seochat tools logo