Re: FYI [connolly@hal.com: Re: object oriented data models and client side CGI ]

Bill Janssen <janssen@parc.xerox.com>
Errors-To: listmaster@www0.cern.ch
Date: Sat, 18 Jun 1994 04:22:20 +0200
Errors-To: listmaster@www0.cern.ch
Message-id: <Qi0ZaSsB0KGWBbJjlR@holmes.parc.xerox.com>
Errors-To: listmaster@www0.cern.ch
Reply-To: janssen@parc.xerox.com
Originator: www-talk@info.cern.ch
Sender: www-talk@www0.cern.ch
Precedence: bulk
From: Bill Janssen <janssen@parc.xerox.com>
To: Multiple recipients of list <www-talk@www0.cern.ch>
Subject: Re: FYI [connolly@hal.com: Re: object oriented data models and client side CGI ]
X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
Excerpts from direct: 17-Jun-94 FYI [connolly@hal.com: Re: .. Larry
Masinter@parc.xero (2188)

> You should also check out WINTERP, if you're into rapid-prototyping
> environments.

It's OK, but now that I've got the ILU interface to Python (in
alpha-test at PARC -- thanks, Denis), and Python Tk (still in a state of
flux, but already useful), and mongo amount of stuff already in Python
(check out ftp://ftp.eeel.nist.gov/pub/python/dbhash.tar.gz for a nice
implementation of general hashing with stable storage, much nicer
properties than the standard dbm module), I don't see much sense in
using anything but Python for prototyping.  And final products, for that
matter.

> Python is cool. Tcl is quick-and-dirty, but doesn't scale well.
> (the Tk canvas widget sure is neat... too bad we have to build
> products using OSF/Motif's libXm and Tk doesn't interoperate)

Note that the Tk canvas widget was stolen (with attribution) from Joel
Bartlett's ezd, which is even neater (see
ftp://gatekeeper.dec.com/pub/DEC/ezd/techreport.psf.Z, which is a
compressed Postscript file).  The emerging Python Tk is gradually
eliminating all traces of Tcl -- everything's done in Python.

As a teaser, here's the Python code to find and return a Calendar
Manager object, via ILU, to manipulate the SunOS CM:

# module findCM -- find a calendar manager
pm = {}

def findCM(machine='localhost'):

	import PortMapper		# ILU interface to Sun portmapper
	import CalendarManager	# ILU interface to Sun CM

	global pm

	if not pm.has_key(machine):
		# instantiate portmapper object on machine "machine"
		pm[machine] = PortMapper.T('0@'+machine+'_PortMapper@sunrpc_100000_2|tcp_'+machine+'_111', None)
	cm_spec = {'port': 0, 'prog': 100068, 'vers': 3, 'prot': PortMapper.UDP_Protocol}
	# ask the portmapper what port the calendar manager is using
	cm_port = pm[machine].GetPort (cm_spec)
	if (cm_port == 0):
		raise NoCalendarManager, cm_spec
	# instantiate the CM
	return CalendarManager.CM('0@'+machine+'_CalendarManager@sunrpc_100068_3|udp_'+machine+'_'+str(cm_port), None)
# end of module findCM

Bill