8
|
1 -- psxlindamodule.c をコンパイル。モジュール(psxlinda.so)は"."に作成
|
|
2 -- psxlinda モジュールのパスは環境変数PYTHONPATHで指定
|
|
3
|
|
4 -- 先にldservを起動しておく。
|
|
5 === 例 ===
|
|
6 [yasumura@karateka modules]$ python
|
|
7 Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
|
|
8 [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
|
|
9 Type "help", "copyright", "credits" or "license" for more information.
|
|
10 >>> from FederatedLinda import *
|
|
11 >>> flinda = FederatedLinda()
|
|
12 >>> a = flinda.open("localhost", 10000)
|
|
13 connecting ... 10000
|
|
14 connect middle server 3
|
|
15 >>> rep = a.In(1)
|
|
16 >>> flinda.sync()
|
|
17 >>> a.Out(1,'strings')
|
|
18 >>> flinda.sync()
|
|
19 >>> rep.reply()
|
|
20 'strings'
|
|
21 >>> rep.reply()
|
|
22 >>> rep = a.Rd(2)
|
|
23 >>> flinda.sync()
|
|
24 >>> a.Out(3,'string')
|
|
25 >>> flinda.sync()
|
|
26 >>> a.Out(2, 'sti')
|
|
27 >>> flinda.sync()
|
|
28 >>> rep.reply()
|
|
29 'sti'
|
|
30 >>> ^D
|
|
31 === ここまで ===
|