Author jeff.allen
Recipients jeff.allen, otmarhumbel, stefan.richthofer
Date 2018-07-18.05:45:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@Stefan: Ah sorry. It takes no time for me:
>>> import os, sys
>>> os.path.dirname(os.path.realpath(sys.executable))
Works ok.

I know you worked on this to get distutils working. I'll check as well as I can I haven't broken it again, but if you spot me doing something that does, please say.

In response to the question, I beefed up the test to include URLs like jar:file:\C:\some\jy.jar!\A.class, and it passed (gives C:\some\jy.jar).

Then I threw in a couple of UNC paths for good measure, but here it failed. This seems to be a "won't fix" bug in Java. I have worked around it, but there may be no point because Jython simply does not work from a UNC path. :( This is because of a disagreement internal to name) about the acceptable form of a URL that bites us as soon as we try to read The URL produced by java.lang.ClassLoader.getResource(String name) is rejected by As far as I can find out, Java has embedded some early interpretation of the URL idea that is now contrary to standards it follows elsewhere, and (surprisingly) has not found its way out of the muddle.
Date User Action Args
2018-07-18 05:45:52jeff.allensetmessageid: <>
2018-07-18 05:45:52jeff.allensetrecipients: + jeff.allen, otmarhumbel, stefan.richthofer
2018-07-18 05:45:52jeff.allenlinkissue2410 messages
2018-07-18 05:45:50jeff.allencreate