From c9bdeddb3687746e1cdf9eadddf18e7a9cf07785 Mon Sep 17 00:00:00 2001 From: Yngve Inntjore Levinsen <Yngve.Levinsen@esss.se> Date: Fri, 9 Sep 2016 11:01:07 +0200 Subject: [PATCH] updated for Python3 --- ess/TraceWin.py | 6 +++--- ess/__init__.py | 8 +++++--- ess/installed.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ess/TraceWin.py b/ess/TraceWin.py index c195492..f1e7348 100644 --- a/ess/TraceWin.py +++ b/ess/TraceWin.py @@ -247,7 +247,7 @@ class plt: for i in [97,98]: data=plt[i]$ if data: - print data['x'] + print(data['x']) ''' def __init__(self, filename): # easy storage.. @@ -328,7 +328,7 @@ class plt: ret[key]=self._data[i][key] return ret else: - print "No data to plot at element",key + print("No data to plot at element",key) def calc_s(self): ''' @@ -524,7 +524,7 @@ class density_file: except IndexError: # EOF reached.. break if sys.flags.debug: - print "Number of steps found:", counter + print("Number of steps found:", counter) self.fin.seek(0) # set up the arrays.. diff --git a/ess/__init__.py b/ess/__init__.py index 8471e65..429da9d 100644 --- a/ess/__init__.py +++ b/ess/__init__.py @@ -1,3 +1,5 @@ -import TraceWin -import installed -import lib_tw +__all__ = ["TraceWin", "installed", "lib_tw"] + +from . import TraceWin +from . import installed +from . import lib_tw diff --git a/ess/installed.py b/ess/installed.py index 7774997..0f32e64 100644 --- a/ess/installed.py +++ b/ess/installed.py @@ -25,6 +25,6 @@ def is_package_installed(name): ret=False for package in get_installed_packages(): if name in str(package).lower(): - print "Found",package + print("Found",package) ret=True return ret -- GitLab