view tools/python-PE/modules/README @ 88:5d1189e9e420

MetaLinda.sync() fix
author one
date Thu, 11 Feb 2010 12:22:41 +0900
parents 6c40056777be
children
line wrap: on
line source

-- psxlindamodule.c をコンパイル。モジュール(psxlinda.so)は"."に作成
-- psxlinda モジュールのパスは環境変数PYTHONPATHで指定

-- 先にldservを起動しておく。
=== 例 ===
[yasumura@karateka modules]$ python
Python 2.3.5 (#1, Mar 20 2005, 20:38:20) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from FederatedLinda import *
>>> flinda = FederatedLinda()
>>> a = flinda.open("localhost", 10000)
connecting ... 10000
 connect middle server 3
>>> rep = a.In(1)
>>> flinda.sync()
>>> a.Out(1,'strings')
>>> flinda.sync()
>>> rep.reply()
'strings'
>>> rep.reply()
>>> rep = a.Rd(2)
>>> flinda.sync()
>>> a.Out(3,'string')
>>> flinda.sync()
>>> a.Out(2, 'sti')
>>> flinda.sync()
>>> rep.reply()
'sti'
>>> ^D
=== ここまで ===