summaryrefslogtreecommitdiff
path: root/cad/src/tools/old/checkui.py
diff options
context:
space:
mode:
authorBruce Smith <bruce@nanorex.com>2007-10-05 15:40:23 +0000
committerBruce Smith <bruce@nanorex.com>2007-10-05 15:40:23 +0000
commita0eddb419f271399daaea70b7cbf7939caffcf48 (patch)
tree498ed946450754410b4afa5d4b7243e6ba3d8cbd /cad/src/tools/old/checkui.py
parent8ba766fc0b78e0b53c2fb9ae1d29872cae0fa190 (diff)
downloadnanoengineer-theirix-a0eddb419f271399daaea70b7cbf7939caffcf48.tar.gz
nanoengineer-theirix-a0eddb419f271399daaea70b7cbf7939caffcf48.zip
move some old files
Diffstat (limited to 'cad/src/tools/old/checkui.py')
-rwxr-xr-xcad/src/tools/old/checkui.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/cad/src/tools/old/checkui.py b/cad/src/tools/old/checkui.py
new file mode 100755
index 000000000..0eb2cc792
--- /dev/null
+++ b/cad/src/tools/old/checkui.py
@@ -0,0 +1,36 @@
+# Copyright 2004-2007 Nanorex, Inc. See LICENSE file for details.
+#! /usr/bin/python
+
+"""
+checkui.py
+
+$Id$
+"""
+
+import sys
+from commands import getoutput
+import re
+from StringIO import StringIO
+
+isdef = re.compile("\s*def (\w*)\(self,?\W*([^)]*)\):")
+
+
+if __name__=='__main__':
+
+
+ f = sys.argv[1]
+ if f[-2:] == 'ui':
+ foo = getoutput("pyuic " + sys.argv[1])
+ else:
+ foo = getoutput("cat " + sys.argv[1])
+ bar = StringIO(foo)
+ lis = []
+ for l in bar.readlines():
+ m = isdef.search(l)
+ if m and not '__' == m.group(1)[:2]:
+ if m.group(1) == 'languageChange': continue
+ lis += [m.group(1) + '(' + m.group(2) + ')']
+ lis.sort()
+ for i in lis: print i
+
+