Login  Register

Re: Potential updates to ImageJ + a question

Posted by ctrueden on Feb 17, 2015; 5:02pm
URL: http://imagej.273.s1.nabble.com/Potential-updates-to-ImageJ-a-question-tp5011598p5011638.html

Hi everyone,

> Fiji is still shipped with Java 6 to support some old Mac OS releases

That is true, and there are other reasons too. See also this FAQ entry:
http://imagej.net/Frequently_Asked_Questions#Why_does_ImageJ_still_target_Java_6.3F

> Another problem is that I am unable to import the “os”  module in
> python.

A lot of effort [1] actually went into making sure that things like "import
os" _do_ work (including with the current Jython 2.5.3). So please let us
know the details of the failure if it is still not working for you with a
fully up-to-date ImageJ.

[1] http://fiji.sc/bugzilla/show_bug.cgi?id=741


On Mon, Feb 16, 2015 at 2:33 AM, Niko Ehrenfeuchter <
[hidden email]> wrote:

> Hi,
>
> On 14.02.2015 15:02, John Minter wrote:
>
>> As noted here http://fiji.sc/Jython_Scripting Jython scripting currently
>> implements Python 2.5. To change this would require development upstream
>> of
>> Fiji/ImageJ.
>>
>
> this is true, but mostly for the reason that the latest officially
> "stable" release of Jython is 2.5, see http://www.jython.org/ for details.
>
> If you want a 2.7 version of Jython within Fiji (which I do), you can
> simply enable my update site "IMCF Uni Basel" (see [1] for details and
> instructions), which will install Jython-2.7-beta1.
>
> Please note that this release is considered beta for a reason (although it
> has proven stable and reliable for my tasks). Also note that this is -beta1
> instead of -beta3 as the Jython project decided to drop support for Java 6
> with the release of -beta2 [2] - whereas core Fiji is still shipped with
> Java 6 to support some old Mac OS releases which don't receive newer Java
> versions anymore.
>
>
>  If you want to use os, there is a trick you can use. Package your
>> functions
>> into a python file (e.g. myLib.py) and place it in the $FIJI_ROOT/jars/Lib
>> directory. You will have to create Lib. Then from any Jython script you
>> can
>> import myLib and call myLib.myFunction(). Your jars can be in the usual
>> places...
>>
>
> I'm actually using the "os" module at several points in my Fiji-Jython
> scripts, so you might want to give it a try with 2.7.
>
> Cheers
> ~Niko
>
> [1] http://fiji.sc/List_of_update_sites
> [2] http://fwierzbicki.blogspot.ch/2014/05/jython-27-beta2-released.html
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html