+##\r
+#\r
+# This acts like the main() function for the script, unless it is 'import'ed into another\r
+# script.\r
+#\r
+if __name__ == '__main__':\r
+ EdkLogger.Initialize()\r
+ EdkLogger.SetLevel(EdkLogger.QUIET)\r
+\r
+ Db = Database.Database('Inf.db')\r
+ Db.InitDatabase()\r
+ P = EdkInfParser(os.path.normpath("C:\Framework\Edk\Sample\Platform\Nt32\Dxe\PlatformBds\PlatformBds.inf"), Db, '', '')\r
+ for Inf in P.Sources:\r
+ print(Inf)\r
+ for Item in P.Macros:\r
+ print(Item, P.Macros[Item])\r
+\r
+ Db.Close()\r