home *** CD-ROM | disk | FTP | other *** search
- class Buyer:
- def __setup__(self, maxprice):
- self._maxprice = maxprice
-
- def __main__(self, kos):
- """Entry point upon arrival at a new KOS."""
- broker = kos.broker()
- # B4 == Barry's Big Bass Business :-)
- seller = broker.lookup('Seller_1.Seller', 'B4')
- if seller:
- price = seller.price()
- print 'Seller wants $', price, '... '
- if price > self._maxprice:
- print 'too much!'
- else:
- print "I'll take it!"
- else:
- print 'no seller found here'
-
-