logo       

Re: citlib -- Citadel client library for Python: msg#00007

cms.citadel.devel

Subject: Re: citlib -- Citadel client library for Python

Shayne,

Thanks for the compliment. RE: shared code ... anything that makes sense I am up for. I am currently fleshing out CitConn (renamed from CitServer), which represents a connection to a citadel server, and includes API for each of the 110 commands in the protocol.

Here is CitConn:

https://www.zetadev.com/svn/public/citlib/trunk/site-packages/citlib/CitConn.py


And here is a Python session illustrating its usage:

whit537@josemaria: python
Python 2.4.1 (#1, Sep 26 2005, 11:00:55)
[GCC 3.4.4 20041224 (prerelease) [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> from citlib.CitConn import CitConn
>>> cit = CitConn()
>>> cit.USER('test')
>>> cit.PASS('testing')
('test', '6', '148', '0', '15888', '2', '1128355704')
>>> cit.LFLR()
(('0', 'Main Floor', '17'),)
>>> cit.LOUT()
>>> cit.QUIT()
>>>



As you can see it is pretty wooden. A further abstraction layer will come later.





chad




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise