Skip to content
Snippets Groups Projects
Commit 28cdf5c3 authored by Andreas Freise's avatar Andreas Freise
Browse files

changing prints to function and make selective exception import towards python 3 compatibility

parent 40cf2d2d
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,11 @@ Created on Mon Jan 28 11:58:09 2013
@author: Daniel
"""
from __future__ import print_function
import numpy
from numpy import min,max
import pykat.external.six as six
if six.PY2:
import exceptions
from components import *
from structs import *
......
......@@ -4,6 +4,9 @@ Created on Mon Jan 28 11:10:01 2013
@author: Daniel
"""
from __future__ import print_function
import pykat.external.six as six
if six.PY2:
import exceptions
import pykat.exceptions as pkex
import pykat
......
......@@ -4,6 +4,9 @@ Created on Fri Feb 01 0split()9:09:10 2013
@author: Daniel
"""
from __future__ import print_function
import pykat.external.six as six
if six.PY2:
import exceptions
import abc
from pykat.node_network import *
......
from __future__ import print_function
import pykat.external.six as six
if six.PY2:
import exceptions
import os
......
......@@ -5,12 +5,15 @@ Created on Fri Feb 01 09:13:03 2013
@author: Daniel
"""
from __future__ import print_function
import pykat.external.six as six
if six.PY2:
import exceptions
from PyQt4.QtGui import *
from PyQt4.Qt import *
from PyQt4 import QtSvg
from PyQt4.QtSvg import QGraphicsSvgItem
import pykat.components
import exceptions
import weakref
nsize = 10
......
......@@ -4,7 +4,7 @@ Created on Sun Jan 27 10:02:41 2013
@author: Daniel
"""
from __future__ import print_function
from pykat import USE_GUI, NoGUIException
if USE_GUI:
......@@ -349,7 +349,7 @@ class NodeNetwork(object):
return False
elif isinstance(currcomp, pykat.components.isolator):
print "isol"
print("isol")
elif isinstance(currcomp, pykat.components.laser):
# if we are at a laser then we can't go any further
# and it isn;t this node as we checked before
......
from __future__ import print_function
import abc
import pykat.exceptions as pkex
import weakref
......@@ -150,7 +151,7 @@ class Param(putable, putter):
#if this param can be put somewhere we need to check if it is
if self.isPutable:
for a in self.putees:
print "Removing put from {0} {1} to {2} {3}".format(self.owner.name, self.name, a.owner.name, a.name)
print("Removing put from {0} {1} to {2} {3}".format(self.owner.name, self.name, a.owner.name, a.name))
a._putter = None
self.put_count -= 1
......@@ -160,7 +161,7 @@ class Param(putable, putter):
# check if we have anything being put to us
if self.isPutter:
if self._putter != None:
print "Removing put from {0} {1} to {2} {3}".format(self._putter.owner.name, self._putter.name, self.owner.name, self.name)
print("Removing put from {0} {1} to {2} {3}".format(self._putter.owner.name, self._putter.name, self.owner.name, self.name))
self._putter.put_count -= 1
self._putter.putees.remove(self)
self._putter = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment