summaryrefslogtreecommitdiff
path: root/lib/stwcs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stwcs/gui')
-rw-r--r--lib/stwcs/gui/__init__.py20
-rw-r--r--lib/stwcs/gui/archive_headerlet.py11
-rw-r--r--lib/stwcs/gui/delete_headerlet.py11
-rw-r--r--lib/stwcs/gui/extract_headerlet.py11
-rw-r--r--lib/stwcs/gui/updatewcs.py3
-rw-r--r--lib/stwcs/gui/write_headerlet.py21
6 files changed, 41 insertions, 36 deletions
diff --git a/lib/stwcs/gui/__init__.py b/lib/stwcs/gui/__init__.py
index 559d361..cd21bf6 100644
--- a/lib/stwcs/gui/__init__.py
+++ b/lib/stwcs/gui/__init__.py
@@ -4,16 +4,16 @@ This package defines the TEAL interfaces for public, file-based operations
provided by the STWCS package.
"""
-from __future__ import division # confidence high
+from __future__ import absolute_import # confidence high
__docformat__ = 'restructuredtext'
# import modules which define the TEAL interfaces
-import write_headerlet
-import extract_headerlet
-import attach_headerlet
-import delete_headerlet
-import headerlet_summary
-import archive_headerlet
-import restore_headerlet
-import apply_headerlet
-import updatewcs
+from . import write_headerlet
+from . import extract_headerlet
+from . import attach_headerlet
+from . import delete_headerlet
+from . import headerlet_summary
+from . import archive_headerlet
+from . import restore_headerlet
+from . import apply_headerlet
+from . import updatewcs
diff --git a/lib/stwcs/gui/archive_headerlet.py b/lib/stwcs/gui/archive_headerlet.py
index 70dbc89..3cc29e3 100644
--- a/lib/stwcs/gui/archive_headerlet.py
+++ b/lib/stwcs/gui/archive_headerlet.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import os
import string
@@ -35,11 +36,11 @@ def getHelpAsString(docstring=False):
def run(configObj=None):
if configObj['hdrname'] in ['',' ','INDEF']:
- print '='*60
- print 'ERROR:'
- print ' No valid "hdrname" parameter value provided!'
- print ' Please restart this task and provide a value for this parameter.'
- print '='*60
+ print('='*60)
+ print('ERROR:')
+ print(' No valid "hdrname" parameter value provided!')
+ print(' Please restart this task and provide a value for this parameter.')
+ print('='*60)
return
str_kw = ['wcsname','destim','sipname','npolfile','d2imfile',
diff --git a/lib/stwcs/gui/delete_headerlet.py b/lib/stwcs/gui/delete_headerlet.py
index 96d3ed1..b3df5a7 100644
--- a/lib/stwcs/gui/delete_headerlet.py
+++ b/lib/stwcs/gui/delete_headerlet.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import os
from stsci.tools import teal
@@ -34,11 +35,11 @@ def run(configObj=None):
if configObj['hdrname'] == '' and configObj['hdrext'] is None and \
configObj['distname'] == '':
- print '='*60
- print 'ERROR:'
- print ' No valid "hdrname", "hdrext" or "distname" parameter value provided!'
- print ' Please restart this task and provide a value for one of these parameters.'
- print '='*60
+ print('='*60)
+ print('ERROR:')
+ print(' No valid "hdrname", "hdrext" or "distname" parameter value provided!')
+ print(' Please restart this task and provide a value for one of these parameters.')
+ print('='*60)
return
filename = parseinput.parseinput(configObj['filename'])[0]
# Call function with properly interpreted input parameters
diff --git a/lib/stwcs/gui/extract_headerlet.py b/lib/stwcs/gui/extract_headerlet.py
index 972f5c7..02ecd7a 100644
--- a/lib/stwcs/gui/extract_headerlet.py
+++ b/lib/stwcs/gui/extract_headerlet.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import os
from stsci.tools import teal
@@ -33,11 +34,11 @@ def getHelpAsString(docstring=False):
def run(configObj=None):
if configObj['output'] in ['',' ',None]:
- print '='*60
- print 'ERROR:'
- print ' No valid "output" parameter value provided!'
- print ' Please restart this task and provide a value for this parameter.'
- print '='*60
+ print('='*60)
+ print('ERROR:')
+ print(' No valid "output" parameter value provided!')
+ print(' Please restart this task and provide a value for this parameter.')
+ print('='*60)
return
# create dictionary of remaining parameters, deleting extraneous ones
diff --git a/lib/stwcs/gui/updatewcs.py b/lib/stwcs/gui/updatewcs.py
index f8f10d7..3dacb67 100644
--- a/lib/stwcs/gui/updatewcs.py
+++ b/lib/stwcs/gui/updatewcs.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import os
from astropy.io import fits
@@ -68,7 +69,7 @@ def run(configObj=None):
# Check to insure that there is a valid reference file to be used
idctab = fits.getval(file, 'idctab')
if not os.path.exists(fileutil.osfn(idctab)):
- print 'No valid distortion reference file ',idctab,' found in ',file,'!'
+ print('No valid distortion reference file ',idctab,' found in ',file,'!')
raise ValueError
# Re-define 'cdict' to only have switches for steps supported by that instrument
diff --git a/lib/stwcs/gui/write_headerlet.py b/lib/stwcs/gui/write_headerlet.py
index 353e32b..e18bed8 100644
--- a/lib/stwcs/gui/write_headerlet.py
+++ b/lib/stwcs/gui/write_headerlet.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import os
from stsci.tools import teal
@@ -34,19 +35,19 @@ def getHelpAsString(docstring=False):
def run(configObj=None):
flist,oname = parseinput.parseinput(configObj['filename'])
if len(flist) == 0:
- print '='*60
- print 'ERROR:'
- print ' No valid "filename" parameter value provided!'
- print ' Please check the working directory and restart this task.'
- print '='*60
+ print('='*60)
+ print('ERROR:')
+ print(' No valid "filename" parameter value provided!')
+ print(' Please check the working directory and restart this task.')
+ print('='*60)
return
if configObj['hdrname'] in ['',' ','INDEF']:
- print '='*60
- print 'ERROR:'
- print ' No valid "hdrname" parameter value provided!'
- print ' Please restart this task and provide a value for this parameter.'
- print '='*60
+ print('='*60)
+ print('ERROR:')
+ print(' No valid "hdrname" parameter value provided!')
+ print(' Please restart this task and provide a value for this parameter.')
+ print('='*60)
return
if configObj['output'] in ['',' ','INDEF']: