Re: Current state of Python bindings.



On Tue, 2007-08-28 at 15:54 +0100, Mark Doffman wrote:

ps. Adding the mailing list in CC

> I'm going to keep going trying to get the Python demo going again
> today, but i'd also like us to get a roadmap for the future. The
> e-mail I sent went very much like ..... Complete the Entire API in
> Python and make it good. I don't know the Tinymail interfaces at all
> yet, what I'm wondering is if there are any areas that you consider
> 'essential' and others that are optional, so we can concentrate first
> on what is absolutely necessary to put a client together.

All of the API that the Python demo in tests/python uses is also really
necessary (It's really a minimal client). Very few Python code runs,
though. The vast majority of components are purely implemented in
Tinymail's library for the Python demo.

Python just calls the C APIs and glues it together very minimalistic.
This is also why the "gc.collect()" is used: very few Python code ever
runs, so Python's garbage collector wouldn't have a clue about when to
consider a garbage collection invocation.

The more fine grained your E-mail client becomes, the more API you will
need in Python, of course.

If you, for example, want to make a "reply" version of an E-mail, you'll
need to stream the content of the E-mail to a buffer that adds "> " in
front of each line and wraps that buffer with a TnyStream implementation
(in Python) and sets that stream as source for a new E-mail. For this
example you'd need to have TnyMsgView, TnyMimePartView and TnyStream to
be implementable in Python.

Obviously are TnyAccount, TnyMsg,TnyMimePart, TnyStoreAccount,
TnyTransportAccount, TnyFolderStore and TnyFolder important types to
fully support.

> Similarly with the scanvirtuals option, are there any classes /
> interfaces that need this option, as they are likely to be implemented
> in python. 

The important ones are TnyAccountStore, TnyPlatformFactory, TnyMsgView,
TnyMimePartView and TnyDevice.

If you can't implement those, you can't make an E-mail client. The
reason why the Python demo still can work, is because there are default
implementations for all those types in the framework. The Python demo
uses those default implementations.




-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]