LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-21-2009, 01:50 AM   #1
threaderslash
Member
 
Registered: Dec 2008
Location: HongKong
Distribution: Fedora/Centos/RedHat
Posts: 109

Rep: Reputation: 15
Cool connecting python and lotus notes: not opened


Hi Everybody,

Hope someone can point me some direction...

I got python linking to lotus notes, under Eclipse IDE. The code is:
Code:
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:
Code:
".nsf has not been opened yet"
Any suggestion? Thanks.
 
Old 10-22-2009, 11:56 AM   #2
ordinary
Member
 
Registered: Apr 2007
Location: the Rocket City
Distribution: Debian, Ubuntu, CentOS; in days past Fedora, Solaris, SunOS, 4.2BSD, 4.3BSD, SVR4, AIX, HP-UX
Posts: 95

Rep: Reputation: Disabled
The first thing I notice is that you are using a Windows path in the "db = ..." line. Is this program supposed to run on a Windows box or a Linux box?

Oh, yeah, on slightly closer examination, there are other Windows dependencies. Does Eclipse run on Windows? I don't even know.

All I know is that if this is a Linux program, the Windows dependencies need to go, and if it's a Windows program you'd get better advice on a Windows forum.

Good luck.

Last edited by ordinary; 10-22-2009 at 12:01 PM.
 
Old 11-04-2009, 04:42 PM   #3
threaderslash
Member
 
Registered: Dec 2008
Location: HongKong
Distribution: Fedora/Centos/RedHat
Posts: 109

Original Poster
Rep: Reputation: 15
Cool migrating from Lotus Notes to MySQL

At the end of the day we discovered that you can get access to Lotus Notes using ODBC - NotesSQL. It work fine and for what we need much better than win32com.
 
  


Reply

Tags
member


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lotus notes problem soumalya Linux - Networking 0 08-27-2009 01:44 PM
Lotus Notes on Solaris 10 ? as400 Solaris / OpenSolaris 0 10-30-2007 04:44 PM
WINE and LOTUS NOTES darkshyre Linux - Software 9 05-09-2006 02:44 AM
Lotus Notes 6.5 noyoushutup3 Linux - Software 2 10-22-2004 10:23 AM
Lotus Notes DavidPhillips Linux - General 15 05-28-2003 07:40 AM


All times are GMT -5. The time now is 08:44 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration