MCPcopy Create free account
hub / github.com/mhammond/pywin32 / GetDocumentList

Method GetDocumentList

Pythonwin/win32template.cpp:214–227  ·  view source on GitHub ↗

@pymethod list|PyCDocTemplate|GetDocumentList|Return a list of all open documents.

Source from the content-addressed store, hash-verified

212
213// @pymethod list|PyCDocTemplate|GetDocumentList|Return a list of all open documents.
214PyObject *
215PyCDocTemplate::GetDocumentList(PyObject *self, PyObject *args)
216{
217 if (!PyArg_ParseTuple(args,":GetDocumentList"))
218 return NULL;
219 CPythonDocTemplate *pTemplate = GetTemplate(self);
220 PyObject *newOb = PyList_New(0);
221 POSITION posDoc = pTemplate->GetFirstDocPosition();
222 while (posDoc) {
223 CDocument* pDoc = pTemplate->GetNextDoc(posDoc);
224 PyList_Append(newOb, ui_assoc_object::make(PyCDocument::type, pDoc)->GetGoodRet());
225 }
226 return newOb;
227}
228
229// @pymethod <o PyCDocument>|PyCDocTemplate|FindOpenDocument|Returns an existing document with the specified file name.
230PyObject *

Callers 10

OpenRegistryKeyMethod · 0.80
OpenObjectMethod · 0.80
__init__Method · 0.80
RespondDebuggerStateMethod · 0.80
UpdateAllLineStatesMethod · 0.80
OnClearAllMethod · 0.80
OnFileSaveAllMethod · 0.80
_FindItFunction · 0.80
OpenObjectMethod · 0.80

Calls 1

GetGoodRetMethod · 0.80

Tested by

no test coverage detected