|
|
|
|
|
|
|
|
|
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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. |
|
|
|
|
|
|
|
|
|
|