#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2023 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Skip this script!
if fileName == __myName:
if not quiet:
- print "!!! Skipping script %s !!!" % __myName
+ print("!!! Skipping script %s !!!" % __myName)
continue
ok = False
if fileName[-28:] != "MEDCouplingNatureOfFieldEnum":
else:
ok = True
if not ok: continue # skip file
- if not quiet: print "Handling %s ..." % fileName
+ if not quiet: print("Handling %s ..." % fileName)
for line in fileinput.input(fileName, inplace=1, backup='.bak'):
for before, after in REPLACEMENTS:
line = re.sub("(\W|^)(%s)(\W|$)" % before, r"\1%s\3" % after, line.rstrip('\r\n'))