PyXR

c:\python24\lib\site-packages\win32 \ com \ test \ testROT.py



0001 import pythoncom
0002 import unittest
0003 import win32com.test.util
0004 
0005 class TestROT(win32com.test.util.TestCase):
0006     def testit(self):
0007         ctx = pythoncom.CreateBindCtx()
0008         rot = pythoncom.GetRunningObjectTable()
0009         num = 0
0010         for mk in rot:
0011             name = mk.GetDisplayName(ctx, None)
0012             num += 1
0013             # Monikers themselves can iterate their contents
0014             for sub in mk:
0015                 num += 1
0016 
0017         #if num < 2:
0018         #    print "Only", num, "objects in the ROT - this is unusual"
0019 
0020 if __name__=='__main__':
0021     unittest.main()
0022 

Generated by PyXR 0.9.4
SourceForge.net Logo