Hi Philippe,
thanks for fast response.
---- Pôvodná správa ----
Od koho: Philippe Normand <[EMAIL PROTECTED]>
Komu: mato konecny <[EMAIL PROTECTED]>
Dátum: 5. 12. 2008 9:48:00
Predmet: Re: [Elisa] Pickling Model objects; plugin dependencies
Le vendredi 05 décembre 2008 à 08:39 +0000, mato konecny a écrit :
> Hi all,
>
> I am working on IMDb plugin, some work is already done which is
> nice :). Fighting (sorry, playing) with python/twisted and so on :)
> For now, I can retrieve/show details, posters. The information
> retrieval is based on folder name which is used for IMDb search query.
>
> I want to cache movie model so the next time I don't have to load it
> from internet. For posters this works easily (just get the JPG data
> and dump it in file), however when I pickle my model (inherited from
> Model, thus Bindable), the unpickling won't work (for obvious reason -
> bindings are not valid anymore). My idea was to solve it locally now,
> whether overriding __reduce__ or making own XML se/deserializer (more
> work of course). Which one is preferred way, and shouldn't this be
> solved on Bindable itself?
>
Maybe you could store the informations in the elisa database?
That will be even better, but I wasn't sure how to do it. Can actually any
plugin extend database? For me it will be quite convenient to store this in the
database, but if I can serialize it easily in a file, I don't care. Can anybody
give some feedback on this?
> Is it possible to set dependencies which plugin has for external
> libraries (such as BeautifulSoup etc)?
>
You can maybe use the setup() install_requires parameter. As explained
there:
http://peak.telecommunity.com/DevCenter/setuptools#new-and-changed-setup-keywords
> And one small UI question - how can I make text "wrap". I tried longer
> text with Label or Text widget but I can't get it to wrap to next
> line. Specifing height makes the font just bigger...
>
You set width and font_height:
body.font_height = 1 / float(lines_number + 1)
Some tests might be required and maybe some Pigment dude can explain
further ;)
I'll try this, although I of course don't know the number of lines upfront. Is
there actually some documentation on the UI development under Pigment? I wasn't
able to much information on elisa API documentation on this.
Matej
> Thanks
> Matej
> ----------
> www.inpage.sk Domena, webhosting, e-mail a seo od 3 Sk/denne.
----------
www.inPage.sk ��� Domena, webhosting, e-mail a seo od 3 Sk/denne.