[ANN] New Python 9P implementation

179 views
Skip to first unread message

Kris Maglione

unread,
May 18, 2009, 10:48:57 PM5/18/09
to 9p-hackers
Hi,

I've just released a new Python 9P client implementation. It's
based largely on my r9p library, but is a good bit cleaner and
faster. It has a simple but high level client library and should
be fully thread safe. The serialization code is based on a high
level message specification, so adding new data types is as
straight forward as reading a spec and translating it into
Python. I suspect that that will be useful to at least some
people who want to implement high level IPC on top of 9P.

For the moment, it's bundled with wmii, but I'll release it
separately after it's been thoroughly broken in:

http://code.suckless.org/hg/wmii/file/tip/alternative_wmiircs/python/pyxp/

--
Kris Maglione

I believe that when I die I shall rot, and nothing of my ego will
survive. I am not young, and I love life. But I should scorn to
shiver with terror at the thought of annihilation. Happiness is none
the less true happiness because it must come to an end, nor do thought
and love lose their value because they are not everlasting.
--Bertrand Russell

caerwyn

unread,
May 29, 2009, 4:50:17 PM5/29/09
to 9p-hackers
Excellent! This is just what I've been wanting. I can now try writing
acme-sac
clients in python...

#!/dis/python26
import pyxp
c = pyxp.Client("tcp!localhost!6666")
f = c.open("/mnt/acme/new/ctl")
l = f.readlines().next()
(id, nt ,nb, isdir, ismod, width, font, tabwidth) = l.split()
bodypath = "/mnt/acme/%s/body" % id
body = c.open(bodypath, 0x02)
body.write("hello, world!")
quit()


Thanks,
Caerwyn

On May 18, 10:48 pm, Kris Maglione <maglion...@gmail.com> wrote:
> Hi,
>
> I've just released a new Python 9P client implementation. It's
> based largely on my r9p library, but is a good bit cleaner and
> faster. It has a simple but high level client library and should
> be fully thread safe. The serialization code is based on a high
> level message specification, so adding new data types is as
> straight forward as reading a spec and translating it into
> Python. I suspect that that will be useful to at least some
> people who want to implement high level IPC on top of 9P.
>
> For the moment, it's bundled with wmii, but I'll release it
> separately after it's been thoroughly broken in:
>
> http://code.suckless.org/hg/wmii/file/tip/alternative_wmiircs/python/...
Reply all
Reply to author
Forward
0 new messages