Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Using Python to create a command line interpreter for Notes (continued)

However, unlike other scripting tools such as VBScript, JavaScript, or LotusScript, it's fast and powerful enough to write Web browsers, Web servers, virtual reality modeling systems, CORBA brokers, and database servers. For a flavor of what's possible for Python programmers, check out the Zope Web application server (at http://www.zope.org), the Ultraseek search engine (at http://www.ultraseek.com), or the eGroups discussion groups site (at http://www.egroups.com), all of which are written in almost 100% Python.

Aside from its ability as a general development language, Python is designed to work well with other systems, such as Lotus Notes, or as an alternative scripting language in Active Server Pages. It's also designed to allow users to shift easily from using it as a console command tool to writing scripts and classes. A huge support library of ready-made classes makes XML, graphics, database, and email programming snappy and simple.

There are three quite different ways to make Python interact with a Lotus Notes client or Domino server:

  • Use Domino's interface to the Microsoft COM (Component Object Model) or OLE (Object Linking and Embedding) standard;
  • Use the Lotus.Domino Java classes;
  • Use the Notes C++ API.

Using COM
This method is naturally limited to Windows 9X or Windows NT platforms. To get started with Python on Windows, download the PythonWin implementation from http://starship.python.net/crew/mhammond/. This has an easy-to-use interface, Win32 DLL (Dynamic Link Library) support, ASP (Active Server Pages) integration, and the color-coded syntax that even the LotusScript IDE (Interactive Development Environment) now has in R5. Most importantly, PythonWin hooks into Microsoft's COM, also known as ActiveX and OLE. There will be more on that in a minute. For now, download and run the PythonWin installer, and within minutes you should be sitting with the command screen shown in Figure A.

FIGURE A


Here's the Python command line interface with a classic "Hello World" programming sample. Roll over picture for a larger image.

As you can see, the basic Python syntax is very simple and not too distant from LotusScript. The basic keywords are used to teach children computing languages. The single idiosyncrasy some people find to be an obstacle is that indentation in control structures, such as FOR loops and IF THEN ENDIF blocks, is mandatory. You must press Tab to indent code within such blocks. Python programmers point to the spaghetti code that results, especially in Perl and C, from the lack of this mandate in other languages.

This article isn't going to teach you Python. There are plenty of good books and Web sites already doing that. However, you can use it quite happily as a command line interpreter without knowing much of the language. Knowledge of the Lotus classes being used is much more critical.

Linking to Lotus Notes
The next stage--linking to Lotus Notes--requires a little understanding of Microsoft's COM (current name), OLE (old name for the same thing), and ActiveX (Microsoft's marketing department's name for it).


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  6  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
  • Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
  • User friendly aproach, using a point and click access to features
  • Reports from any Lotus Notes databases
  • Runs reports through a Notes client, web browser and scheduled basis
  • Allows use of LotusScript for advanced data manipulation
  • Enables self service reporting capabilities to end-users


Learn more at www.integra4notes.com.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login