def testHook():
    """Prints the Module class hierarchy to stdout."""
    def printTree(n, indent = 0):
        def iprint(str):
            print '%s%s' % (" " * indent, str)
        iprint('Class: %s' % n.descriptor.name)
        for c in n.children:
            printTree(c, indent+4)
            
    import modules
    import modules.module_registry
    t = modules.module_registry.registry.classTree
    printTree(t)

# Uncomment this line to install the startup hook
# addStartupHook(testHook)


##############################################################################
# If you have an appropriate Qt license, you can install signal inspectors,
# which might make debugging a whole lot easier. To do that, uncomment the
# following lines.


# import qt
# connections = {}
# def connectHandler(*args):
#     """This handler writes all signal connections to /tmp/signalslotnames.txt"""
#     emitter = args[0].__class__.__name__
#     signal = args[1]
#     f = signal.find('(')
#     if f == -1:
#         signal = signal[1:]
#     else:
#         signal = signal[1:f]
#     try:
#         receiver = args[2].im_class.__name__
#         slot = args[2].im_func.__name__
#     except AttributeError:
#         receiver = args[2].__self__.__class__.__name__
#         slot = args[2].__class__.__name__
#     entry = (emitter, signal, receiver, slot)
#     print entry
#     global connections
#     try:
#         connections[emitter].add((signal, receiver, slot))
#     except:
#         connections[emitter] = set(((signal, receiver, slot),))
#     signals = {}
#     slots = {}
#     sig_count = 1
#     slot_count = 1
#     f = file('/tmp/connections.txt', 'w')
#     f.write('digraph {\n')
#     for (k, v) in connections.iteritems():
#         print k, v
#         recs = {}
#         for (sig, rec, sl) in v:
#             if not signals.has_key(sig):
#                 signals[sig] = sig_count
#                 sig_count += 1
#             if not slots.has_key(sl):
#                 slots[sl] = slot_count
#                 slot_count += 1
#             try:
#                 recs[rec].append( str(signals[sig]) + ':' + str(slots[sl]))
#             except:
#                 recs[rec] = [str(signals[sig]) + ':' + str(slots[sl])]
#         for rec, sigslotlist in recs.iteritems():
#             f.write('%s -> %s [label = "%s"];\n' % (k, rec, ";".join(sigslotlist)))
# #     if not entry in connections:
# #         f = file('/tmp/connections.txt', 'a')
# #         f.write("%s %s %s\n" % emi)
# #         f.close()
# #     connections.add(entry)
#     f.write('}\n')
#     f.close()
#     f = file('/tmp/signalslotnames.txt', 'w')
#     sigs = [(v, k) for (k, v) in signals.items()]
#     sigs.sort()
#     sls = [(v, k) for (k, v) in slots.items()]
#     sls.sort()
#     f.write('signals: \n')
#     for (k,v) in sigs:
#         f.write('%s: %s\n' % (k, v))
#     f.write('slots: \n')
#     for (k,v) in sls:
#         f.write('%s: %s\n' % (k, v))


# This line hooks connectHandler to Qt's signals. You can use user-defined
# code here.
# qt.enableSignalDebugging(connectCall = connectHandler)
dataset/ETHPy150Open VisTrails/VisTrails/scripts/dist/windows/Input/startup.py/testHook/original