Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
BEYOND LOTUSSCRIPT
Using Python to create a command line interpreter for Notes
By Jeffrey R. Burrows

Unix geeks, SQL (Structured Query Language) programmers, and old DOS hacks have one thing in common--a hankering for direct command line access to software, rather then the end-user-friendly graphical frills with which all software must be adorned nowadays. Even the Palm OS has a CLI (Command Line Interpreter) developer for it, although that may be a command line too far!

Good CLIs (or shells, as they're more commonly known in Unix) make it easy to explore file systems and objects, to test out small scraps of code, and to write full programs only when really needed. Even the DOS command.com can do basic IF and FOR statements, and good Unix shells--such as csh, bash, or ksh--are almost full programming languages in their own right. Most good CLIs let you save lines of commonly typed-in commands so they can be re-used easily. These are known as shell scripts in Unix and as batch files in DOS and Windows.

Lotus Notes does have a command console, but only for basic server administration. Any one-off changes to documents or experimenting with code and objects must be made using agents, and most Notes developers will have a continual turnover of agents made to be used just once (some of which never seem to get deleted from database templates).

This article will show you how a CLI is easily possible with Notes. It will also help Notes programmers venture beyond the world of LotusScript and spreadsheet formula language into two sets of wider worlds--the corporate world dominated by Microsoft standards and the Unixy, Linuxy, geeky world beyond.

The open source bits of our Notes command line
Cross-platform, object-oriented with classes, easily learned, and rapidly developed--that's what LotusScript tries hard to be, but with big limitations. For one thing, it's obviously limited to the world of Lotus, and there's none of the standard libraries, such as those for handling images, Internet protocols, zip files, etc., with which Java is so well endowed. Simple tasks like picking up mail from a POP3 server and manipulating the contents require major brainpower in LotusScript.

On the other hand, Java can be a daunting alternative, with its precise syntax and longer compile cycles, not to mention the disappointing performance. The other common language, Perl, produces code that seems to be perversely aimed at being as un-maintainable as possible.

The open source alternative is called Python at http://www.python.com. It's a fully cross-platform interpreted scripting language, running on UNIX, Linux, Macs, MS-DOS, Windows, Windows NT, Windows CE, OS/2, Java VM, and in the pipeline for the Palm OS.





[ Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- 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 --

SECURTRAC - MONITOR AND CONTROL YOUR DOMINO ENVIRONMENT
When it comes to your business, how do you ensure compliance with SOX, HIPAA or other industry driven regulations? Use SecurTrac to monitor and audit the life cycle of all objects in your Domino environment.
  • Database Monitor
  • Mail Monitor
  • Domino Directory Monitor
  • Notes.ini File Monitor
  • Intrusion Detection Monitor


Click here for details and a free evaluation copy.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login