]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/demo.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Tools / compiler / demo.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/demo.py b/AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/demo.py
deleted file mode 100644 (file)
index cbdc208..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/env python\r
-\r
-"""Print names of all methods defined in module\r
-\r
-This script demonstrates use of the visitor interface of the compiler\r
-package.\r
-"""\r
-\r
-import compiler\r
-\r
-class MethodFinder:\r
-    """Print the names of all the methods\r
-\r
-    Each visit method takes two arguments, the node and its current\r
-    scope.  The scope is the name of the current class or None.\r
-    """\r
-\r
-    def visitClass(self, node, scope=None):\r
-        self.visit(node.code, node.name)\r
-\r
-    def visitFunction(self, node, scope=None):\r
-        if scope is not None:\r
-            print "%s.%s" % (scope, node.name)\r
-        self.visit(node.code, None)\r
-\r
-def main(files):\r
-    mf = MethodFinder()\r
-    for file in files:\r
-        f = open(file)\r
-        buf = f.read()\r
-        f.close()\r
-        ast = compiler.parse(buf)\r
-        compiler.walk(ast, mf)\r
-\r
-if __name__ == "__main__":\r
-    import sys\r
-\r
-    main(sys.argv[1:])\r