> thanks for your contribution. It looks really clean and
> lovely, and with your permission, I would like to use
> it as part of the talk ("Scripting Java") I am giving at
> JavaOne in March.
Wow, that's flattery, (blush). You (and everybody else) are of course
permitted to do whatever you like with the code.
If you are interested, I have made some subclasses of the classes I
sent you, that instead of using the jawin COM bridge, uses the jacob
com bridge instead. In my experience jawin and jacob seems to be very
similar. They both use JNI to access the native COM library, and the
api they present are quite similar. Both projects are also open source
and with no painful restrictions for use as far as I have seen.
Both jawin and jacob have associated code generators for generating
java wrapper code to make using COM from java more like using "real"
java objects, but these tools at least for jawin, seems to be a bit
alpha for the time being. When I tried it, there were some methods
that the generator didn't create and so on.
The code generator shouldn't be that necessary in jython, because as I
have shown in the jythoncom.py file, we can present a pythonic
interface by doing tricks with __getattr__ and friends. One thing
might be problematic and that is byref/out parameters, which should be
translated to multiple returnvalues in python. pythoncom/win32com for
cpython is able to handle this when using generated wrappers, but it
is a problem for the dynamic version of the com support (ie. similar
to the jythoncom module)
It would probably be a good thing to make some base class that are
independent of the underlying COM bridge, put the various
implementations in their own module, at least when the implementation
has stabilized a bit.
Maybe like this?
Get latest updates about Open Source Projects, Conferences and News.