+ def Destroy_Name(self,Path):
+ resolve_path=string.split(Path,'/')
+ if resolve_path[0] == '': del resolve_path[0]
+ dir_path=resolve_path[:-1]
+ context_name=[]
+ for e in dir_path:
+ context_name.append(CosNaming.NameComponent(e,"dir"))
+ context_name.append(CosNaming.NameComponent(resolve_path[-1],"object"))
+
+ try:
+ self._root_context.unbind(context_name)
+ except CosNaming.NamingContext.NotFound, ex:
+ return
+ except CORBA.Exception,ex:
+ return
+
+ def Destroy_FullDirectory(self,Path):
+ context_name=[]
+ for e in string.split(Path,'/'):
+ if e == '':continue
+ context_name.append(CosNaming.NameComponent(e,"dir"))
+
+ try:
+ context=self._root_context.resolve(context_name)
+ except CosNaming.NamingContext.NotFound, ex:
+ return
+ except CORBA.Exception,ex:
+ return
+
+ bl,bi=context.list(0)
+ if bi is not None:
+ ok,b=bi.next_one()
+ while(ok):
+ for s in b.binding_name :
+ if s.kind == "object":
+ context.unbind([s])
+ elif s.kind == "dir":
+ context.unbind([s])
+ ok,b=bi.next_one()
+
+ context.destroy()
+ self._root_context.unbind(context_name)