From: David R. <abu...@gm...> - 2005-03-15 06:49:20
|
Is there any way of using the pywin32 package from jython? Or is there possibly a different solution to doing OLE automation from jython? I'm looking to do OLE from Ant and am looking for a convenient method. Thanks, David |
From: Andre B. <an...@bu...> - 2005-03-15 12:13:23
|
http://www.javaworld.com/javaworld/jw-03-2005/jw-0314-scripting-p1.html Andre http://www.burgaud.com/ |
From: <oma...@st...> - 2005-03-15 14:08:38
|
I saw a thread on this dated 23sep 2001, where the solution given by 'rb' was: jythonc --all --jar Hello.jar Hello.py then adding Hello.jar to the applet tag. I successfully display the similar java applet written in java, but it just won't work for me and jython. ###################### My error is: java.lang.NoClassDefFoundError: org/python/core/PyProxy (...) ###################### the --all should've taken care of loading the classes shouldn't it? --core doesn't do it either. I have a big jython program which I want to put on my web page Anyways, this is the inevidable "Hello World", which I use ############################### from javax.swing import JApplet class Hello(JApplet): def __init__(self): print 'constructor' def init(self): print 'init called' def stop(self): print 'stop' def paint(self,g): g.drawString("Hello from OM", 20,20) ################################ -OM |
From: Greg K. <gre...@gm...> - 2005-03-15 16:04:33
|
On Tue, 15 Mar 2005 08:49:08 +0200, David Resnick <abu...@gm...> wrot= e: > Is there any way of using the pywin32 package from jython? Or is there > possibly a different solution to doing OLE automation from jython? I'm > looking to do OLE from Ant and am looking for a convenient method=E2=80= =A6=20 Yeah, I don't think you can use pywin32 from within Jython because pywin32 uses custom C libraries which won't import (you've probably already found this). Unless you want to do something like os.execl("python mypywin32script.py") which is pretty gross. However, if you can't import a Python library because it requires C, just do a search for the same things putting in "java" where you previously had python and you'll get your answer: http://www.google.com/search?hl=3Den&lr=3D&c2coff=3D1&q=3Dole+java&btnG=3DS= earch Like this one: http://forum.java.sun.com/thread.jspa?threadID=3D290410&messageID=3D3227083 Not all of the responses are helpful - but some are. Looks like you have a lot of work in front of you! Or it's time to find a different solution to the problems. Greg |