Skip to content

Commit 5dbfb81

Browse files
author
LeeKamentsky
committed
Merge pull request #52 from alimuldal/python3_support
Python3 support
2 parents 2f10961 + 9e19c32 commit 5dbfb81

15 files changed

+676
-623
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: java
22
env:
33
- PYTHON_VERSION="2.7"
4+
- PYTHON_VERSION="3.5"
45
before_install:
56
# Get the tag if it wasn't provided. Travis doesn't provide this if it isn't a tagged build.
67
- if [ -z $TRAVIS_TAG ]; then TRAVIS_TAG=`git tag --contains` ; fi

bioformats/__init__.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Python-bioformats is distributed under the GNU General Public
22
# License, but this file is licensed under the more permissive BSD
33
# license. See the accompanying file LICENSE for details.
4-
#
4+
#
55
# Copyright (c) 2009-2014 Broad Institute
66
# All rights reserved.
77

88
'''Bioformats package - wrapper for loci.bioformats java code
99
1010
'''
1111

12+
from __future__ import absolute_import, unicode_literals
13+
1214
try:
1315
from _version import __version__
1416
except ImportError:
@@ -30,18 +32,18 @@
3032
to the Java virtual machine's class path."""
3133

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

4749
OMETiffWriter = _formatwriter.make_ome_tiff_writer_class()
@@ -51,7 +53,7 @@
5153

5254
from .metadatatools import createOMEXMLMetadata as create_ome_xml_metadata
5355
from .metadatatools import wrap_imetadata_object
54-
import metadatatools as _metadatatools
56+
from . import metadatatools as _metadatatools
5557
PixelType = _metadatatools.make_pixel_type_class()
5658
get_metadata_options = _metadatatools.get_metadata_options
5759

@@ -101,6 +103,6 @@ def init_logger():
101103
if __name__ == "__main__":
102104
# Handy-dandy PyShell for exploring BioFormats / Rhino / ImageJ
103105
import wx.py.PyCrust
104-
106+
105107
wx.py.PyCrust.main()
106108
J.kill_vm()

0 commit comments

Comments
 (0)