コード例 #1
0
 def EnumObjects(self, hwndOwner, flags):
     objects = get_clbr_for_file(self.path)
     pidls = []
     for name, ob in objects.items():
         pidls.append( ["object\0" + self.path + "\0" + name] )
     return NewEnum(pidls, iid=shell.IID_IEnumIDList,
                    useDispatcher=(debug>0))
コード例 #2
0
 def EnumObjects(self, hwndOwner, flags):
     assert self.method_name is None, "Should not be enuming methods!"
     mod_objects = get_clbr_for_file(self.path)
     my_objects = mod_objects[self.class_name]
     pidls = []
     for func_name, lineno in my_objects.methods.items():
         pidl = ["object\0" + self.path + "\0" +
                 self.class_name + "." + func_name]
         pidls.append(pidl)
     return NewEnum(pidls, iid=shell.IID_IEnumIDList,
                    useDispatcher=(debug>0))
コード例 #3
0
 def EnumObjects(self, hwndOwner, flags):
     pidls = []
     for fname in os.listdir(self.path):
         fqn = os.path.join(self.path, fname)
         if os.path.isdir(fqn):
             type_name = "directory"
             type_class = ShellFolderDirectory
         else:
             base, ext = os.path.splitext(fname)
             if ext in [".py", ".pyw"]:
                 type_class = ShellFolderFile
                 type_name = "file"
             else:
                 type_class = None
         if type_class is not None:
             pidls.append( [type_name + "\0" + fqn] )
     return NewEnum(pidls, iid=shell.IID_IEnumIDList,
                    useDispatcher=(debug>0))
コード例 #4
0
 def EnumFormatEtc(self, direction):
     if direction != pythoncom.DATADIR_GET:
         raise COMException(hresult=winerror.E_NOTIMPL)
     return NewEnum(self.supported_fe, iid=pythoncom.IID_IEnumFORMATETC)
コード例 #5
0
 def _query_interface_(self, iid):
     if iid == pythoncom.IID_IEnumFORMATETC:
         return NewEnum(self.supported_fe, iid=iid)
コード例 #6
0
ファイル: shell_view.py プロジェクト: FlowkoHinti/Dionysos
 def EnumObjects(self, hwndOwner, flags):
     items = [["directory\0" + p] for p in sys.path if os.path.isdir(p)]
     return NewEnum(items,
                    iid=shell.IID_IEnumIDList,
                    useDispatcher=(debug > 0))