starting panda without __builtins__

In 1.6, an item in direct.stdpy.threading, pm (PandaModules), is overwritten by pdb’s pm() function. So, I have to exclude that module.

This is mine :

import sys, __builtin__
__bd__ = __builtin__.__dict__
b = __bd__.copy()
bk = b.keys()

import direct.directbase.DirectStart
__all__ = list( set(__bd__.keys()).symmetric_difference(bk) )
excludedMods = ['stdpy.threading']
mods = [m for m in sys.modules.keys() \
  if sys.modules[m] and m.find('direct.')==0 and m[7:] not in excludedMods]
for md in [globals()] + [sys.modules[m].__dict__ for m in mods]:
   for k in __all__:
      md[k]=__bd__[k]
__bd__.clear()
for k in bk:
   __bd__[k]=b[k]

note : there might be typos in it.