Skip to content

Commit

Permalink
Merge pull request #52 from alimuldal/python3_support
Browse files Browse the repository at this point in the history
Python3 support
  • Loading branch information
LeeKamentsky committed Apr 4, 2016
2 parents 2f10961 + 9e19c32 commit 5dbfb81
Show file tree
Hide file tree
Showing 15 changed files with 676 additions and 623 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: java
env:
- PYTHON_VERSION="2.7"
- PYTHON_VERSION="3.5"
before_install:
# Get the tag if it wasn't provided. Travis doesn't provide this if it isn't a tagged build.
- if [ -z $TRAVIS_TAG ]; then TRAVIS_TAG=`git tag --contains` ; fi
Expand Down
30 changes: 16 additions & 14 deletions bioformats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Python-bioformats is distributed under the GNU General Public
# License, but this file is licensed under the more permissive BSD
# license. See the accompanying file LICENSE for details.
#
#
# Copyright (c) 2009-2014 Broad Institute
# All rights reserved.

'''Bioformats package - wrapper for loci.bioformats java code
'''

from __future__ import absolute_import, unicode_literals

try:
from _version import __version__
except ImportError:
Expand All @@ -30,18 +32,18 @@
to the Java virtual machine's class path."""

# See http://www.loci.wisc.edu/software/bio-formats
READABLE_FORMATS = ('al3d', 'am', 'amiramesh', 'apl', 'arf', 'avi', 'bmp',
'c01', 'cfg', 'cxd', 'dat', 'dcm', 'dicom', 'dm3', 'dv',
'eps', 'epsi', 'fits', 'flex', 'fli', 'gel', 'gif', 'grey',
'hdr', 'html', 'hx', 'ics', 'ids', 'img', 'ims', 'ipl',
'ipm', 'ipw', 'jp2', 'jpeg', 'jpg', 'l2d', 'labels', 'lei',
'lif', 'liff', 'lim', 'lsm', 'mdb', 'mnc', 'mng', 'mov',
'mrc', 'mrw', 'mtb', 'naf', 'nd', 'nd2', 'nef', 'nhdr',
'nrrd', 'obsep', 'oib', 'oif', 'ome', 'ome.tiff', 'pcx',
'pgm', 'pic', 'pict', 'png', 'ps', 'psd', 'r3d', 'raw',
'scn', 'sdt', 'seq', 'sld', 'stk', 'svs', 'tif', 'tiff',
READABLE_FORMATS = ('al3d', 'am', 'amiramesh', 'apl', 'arf', 'avi', 'bmp',
'c01', 'cfg', 'cxd', 'dat', 'dcm', 'dicom', 'dm3', 'dv',
'eps', 'epsi', 'fits', 'flex', 'fli', 'gel', 'gif', 'grey',
'hdr', 'html', 'hx', 'ics', 'ids', 'img', 'ims', 'ipl',
'ipm', 'ipw', 'jp2', 'jpeg', 'jpg', 'l2d', 'labels', 'lei',
'lif', 'liff', 'lim', 'lsm', 'mdb', 'mnc', 'mng', 'mov',
'mrc', 'mrw', 'mtb', 'naf', 'nd', 'nd2', 'nef', 'nhdr',
'nrrd', 'obsep', 'oib', 'oif', 'ome', 'ome.tiff', 'pcx',
'pgm', 'pic', 'pict', 'png', 'ps', 'psd', 'r3d', 'raw',
'scn', 'sdt', 'seq', 'sld', 'stk', 'svs', 'tif', 'tiff',
'tnb', 'txt', 'vws', 'xdce', 'xml', 'xv', 'xys', 'zvi')
WRITABLE_FORMATS = ('avi', 'eps', 'epsi', 'ics', 'ids', 'jp2', 'jpeg', 'jpg',
WRITABLE_FORMATS = ('avi', 'eps', 'epsi', 'ics', 'ids', 'jp2', 'jpeg', 'jpg',
'mov', 'ome', 'ome.tiff', 'png', 'ps', 'tif', 'tiff')

OMETiffWriter = _formatwriter.make_ome_tiff_writer_class()
Expand All @@ -51,7 +53,7 @@

from .metadatatools import createOMEXMLMetadata as create_ome_xml_metadata
from .metadatatools import wrap_imetadata_object
import metadatatools as _metadatatools
from . import metadatatools as _metadatatools
PixelType = _metadatatools.make_pixel_type_class()
get_metadata_options = _metadatatools.get_metadata_options

Expand Down Expand Up @@ -101,6 +103,6 @@ def init_logger():
if __name__ == "__main__":
# Handy-dandy PyShell for exploring BioFormats / Rhino / ImageJ
import wx.py.PyCrust

wx.py.PyCrust.main()
J.kill_vm()
Loading

0 comments on commit 5dbfb81

Please sign in to comment.