diff options
-rwxr-xr-x | contrib/tdepyuic | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/tdepyuic b/contrib/tdepyuic index 147711b..48444a8 100755 --- a/contrib/tdepyuic +++ b/contrib/tdepyuic @@ -57,7 +57,7 @@ def getOptions (): args = [] if opterr or (len (args) != 1): - print """\nUsage: + print("""\nUsage: tdepyuic [options] filename.ui @@ -66,7 +66,7 @@ def getOptions (): -i, --noimport Don't add tdecore, tdeui import statements -p, --pyuic Path to pyuic program --usetdei18n Adds TDEs default i18n functions to your Python TDE ui file - """ + """) return FALSE filename = args[0] @@ -124,7 +124,7 @@ def doPyuic (): if os.system (pyuicPath + opts + fn + ' ' + filename) != 0: - print pyuicPath + opts + fn + ' ' + filename + " failed" + print(pyuicPath + opts + fn + ' ' + filename + " failed") sys.exit (-1) if addApp or addImport: @@ -134,16 +134,16 @@ def doPyuic (): buff = m.readlines () for line in buff: - if addImport and (string.strip (line) == 'from PyTQt.qt import *'): + if addImport and (line.strip() == 'from PyTQt.qt import *'): n.write (line) addimport (n) - elif addApp and (string.strip (line) == 'a = TQApplication(sys.argv)'): + elif addApp and (line.strip() == 'a = TQApplication(sys.argv)'): indent = 0 while line [indent] in string.whitespace: indent = indent + 1 addapp (line[:indent], n) - elif string.find(line, " = KDatePicker(") != -1: - o = string.find(line, ",") + elif line.find(" = KDatePicker(") != -1: + o = line.find(",") n.write (line[:o] + ",TQDate.currentDate()" + line[o:]) else: n.write (line) @@ -154,7 +154,7 @@ def doPyuic (): os.unlink (fn) os.rename (fn + '.tmp', fn) - print fn + ' written' + print(fn + ' written') # --------- main ---------- |