From 354c99daa69a8cc4eff3b081ec2c0cdce9df102c Mon Sep 17 00:00:00 2001 From: bsimon Date: Mon, 4 May 2015 18:30:51 +0000 Subject: Updated files to run under python 2 and 3 git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@39775 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/gui/write_headerlet.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'lib/stwcs/gui/write_headerlet.py') 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']: -- cgit