win32com lotus notes: not opened

Threader Slash threaderslash at gmail.com
Wed Oct 21 08:17:29 CEST 2009


Hi Everybody,

Hope someone can point me some direction...

I got python linking to lotus notes, under Eclipse IDE. The code is:

import pythoncom
import pywintypes
from win32com.client import Dispatch
session=Dispatch("Lotus.NotesSession")
session

print pythoncom.CreateGuid()

try:
    session.Initialize("password")
    db = session.getDatabase("local", "C:\Program
Files\lotus\notes\data\mydata.nsf")

    agent=db.getAgent("($All)")
    doc = db.CreateDocument()
    view = db.GetView("($All)")
    doc = view.getFirstDocument()

    testvar = doc.getItemValue("($All)")

except pywintypes.com_error: raise

but the compiler gives me the error:

".nsf has not been opened yet"

Any suggestion? Thanks. ThreaderSlash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091021/787d01ee/attachment.html>


More information about the Python-list mailing list