Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / src / nas,5.n2.os.2 / lib / python / lib / python2.4 / test / output / test_MimeWriter
CommitLineData
86530b38
AT
1test_MimeWriter
2From: bwarsaw@cnri.reston.va.us
3Date: Mon Feb 12 17:21:48 EST 1996
4To: kss-submit@cnri.reston.va.us
5MIME-Version: 1.0
6Content-Type: multipart/knowbot;
7 boundary="801spam999";
8 version="0.1"
9
10This is a multi-part message in MIME format.
11
12--801spam999
13Content-Type: multipart/knowbot-metadata;
14 boundary="802spam999"
15
16
17--802spam999
18Content-Type: message/rfc822
19KP-Metadata-Type: simple
20KP-Access: read-only
21
22KPMD-Interpreter: python
23KPMD-Interpreter-Version: 1.3
24KPMD-Owner-Name: Barry Warsaw
25KPMD-Owner-Rendezvous: bwarsaw@cnri.reston.va.us
26KPMD-Home-KSS: kss.cnri.reston.va.us
27KPMD-Identifier: hdl://cnri.kss/my_first_knowbot
28KPMD-Launch-Date: Mon Feb 12 16:39:03 EST 1996
29
30--802spam999
31Content-Type: text/isl
32KP-Metadata-Type: complex
33KP-Metadata-Key: connection
34KP-Access: read-only
35KP-Connection-Description: Barry's Big Bass Business
36KP-Connection-Id: B4
37KP-Connection-Direction: client
38
39INTERFACE Seller-1;
40
41TYPE Seller = OBJECT
42 DOCUMENTATION "A simple Seller interface to test ILU"
43 METHODS
44 price():INTEGER,
45 END;
46
47--802spam999
48Content-Type: message/external-body;
49 access-type="URL";
50 URL="hdl://cnri.kss/generic-knowbot"
51
52Content-Type: text/isl
53KP-Metadata-Type: complex
54KP-Metadata-Key: generic-interface
55KP-Access: read-only
56KP-Connection-Description: Generic Interface for All Knowbots
57KP-Connection-Id: generic-kp
58KP-Connection-Direction: client
59
60
61--802spam999--
62
63--801spam999
64Content-Type: multipart/knowbot-code;
65 boundary="803spam999"
66
67
68--803spam999
69Content-Type: text/plain
70KP-Module-Name: BuyerKP
71
72class Buyer:
73 def __setup__(self, maxprice):
74 self._maxprice = maxprice
75
76 def __main__(self, kos):
77 """Entry point upon arrival at a new KOS."""
78 broker = kos.broker()
79 # B4 == Barry's Big Bass Business :-)
80 seller = broker.lookup('Seller_1.Seller', 'B4')
81 if seller:
82 price = seller.price()
83 print 'Seller wants $', price, '... '
84 if price > self._maxprice:
85 print 'too much!'
86 else:
87 print "I'll take it!"
88 else:
89 print 'no seller found here'
90
91--803spam999--
92
93--801spam999
94Content-Type: multipart/knowbot-state;
95 boundary="804spam999"
96KP-Main-Module: main
97
98
99--804spam999
100Content-Type: text/plain
101KP-Module-Name: main
102
103# instantiate a buyer instance and put it in a magic place for the KOS
104# to find.
105__kp__ = Buyer()
106__kp__.__setup__(500)
107
108--804spam999--
109
110--801spam999--