Make "olefile" work with Jython.

Issue #24 closed
Niko Ehrenfeuchter
created an issue

This issue is mostly meant as notification...

I'm having a scenario where I'd like to use olefile with Jython (the Java implementation of Python), which is unfortunately not 100% compatible to the CPython reference, especially when it comes to data types and number interpretations.

With a lot of debugging I managed to create prototype which is working with Jython 2.7-beta1 on Java 6 / 64-bit (unfortunately I can't use the latest Jython 2.7-beta3 as I am limited to Java 6, for which support was dropped in 2.7-beta2).

It will require a bit more polishing until I can file a pull request. Should be doable in the next days.

@Philippe Lagadec : on top of the Jython stuff, I'd have a couple of suggestions to make the code follow PEP-8 a little better. Are you interested in those?

Cheers ~Niko

Comments (7)

  1. Philippe Lagadec repo owner

    Hi Niko, thanks a lot. Yes, some instructions how to test it with Jython would help. Then I'll merge the pull request. Looking at the code, it should not have an impact on CPython compatibility.

    For the PEP-8 suggestions, please send me a separate message by e-mail or bitbucket.

  2. Niko Ehrenfeuchter reporter

    Hi Philippe,

    I'll do so, but it might take a while - I'm super busy at the moment. Regarding CPython, I've done some preliminary (manual) tests, as this is anyway also my main platform, and it worked as before. As the changes are only very minimal, and happen only while initially parsing the file (at least as far as I can tell) I wouldn't expect any noticable impact on speed either - but some more serious testing probably wouldn't hurt.

    PEP-8 stuff will (of course) go into a separate PR, so you can review it and decide whether you like it or not. However, this will probably take even longer than the Jython stuff ;-)

    Cheers ~Niko

  3. Log in to comment