Skip to content

Commit

Permalink
Merge pull request #103 from StuartLittlefair/python3-compat
Browse files Browse the repository at this point in the history
Python3 compatibility
  • Loading branch information
mwcraig committed Sep 23, 2015
2 parents 17c81c3 + 76051fb commit 52d7fe1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions reducer/astro_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from astropy.modeling import models
import ccdproc
from astropy.extern import six

import numpy as np

Expand Down Expand Up @@ -401,7 +402,7 @@ def action(self):
"(may take several minutes)".format(idx + 1, n_groups))
combined = self._action_for_one_group(combo_group)
name_addons = ['_'.join([str(k), str(v)])
for k, v in combo_group.iteritems()]
for k, v in six.iteritems(combo_group)]
fname = [self._file_base_name]
fname.extend(name_addons)
fname = '_'.join(fname) + '.fit'
Expand Down Expand Up @@ -748,7 +749,7 @@ def __init__(self):
value=1)

def __str__(self):
for k, v in self.values.iteritems():
for k, v in six.iteritems(self.values):
if v == self.value:
return k

Expand Down
3 changes: 2 additions & 1 deletion reducer/image_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import numpy as np

from astropy.io import fits
from astropy.extern import six

import msumastro

Expand Down Expand Up @@ -189,7 +190,7 @@ def _set_titles(self):
This should apparently be done *before* the widget is displayed.
"""
for name, obj in self._gui_objects.iteritems():
for name, obj in six.iteritems(self._gui_objects):
if isinstance(obj, Accordion):
for idx, child in enumerate(obj.children):
if not isinstance(child, widgets.Select):
Expand Down

0 comments on commit 52d7fe1

Please sign in to comment.