Thumbnailctrl.py usage

I'm not sure how to treat thumbnailctrl, located in wxpython install - site-packages\wx-2.8-msw-unicode\wx\lib\agw

Is it considered part of wx, or is it sample code, to be copy/paste and adapted as needed?

The code is faster than I realized was possible, and I'm learning a lot from it. But I need a few features it doesn't offer, and the only way I can acomplish them is by hooking some of the module attributes. Even that has been very educational, and I'm grateful for the challenge.

But the real question is maintainability. The resulting program could be much more readable if I can make the changes in (a copy) of the file. But then, new versions would have to be re-integrated.

1) I can hook into the code, using module attributes
2) I can copy the source code to my project, and edit as needed, till it fully meets my needs
3) I could submit patches to the code to make my customizations more straightforward, so that others might be able to do similar things

I'd be happy to explain just what hooks have so far been necessary, but first I wanted to keep the discussion generic. The same discussion will apply to other parts of the wxpython install that are apparently undocumented as mainstream parts of wxpython.

Suggestions?

Hi Dave,

I'm not sure how to treat thumbnailctrl, located in wxpython install -
site-packages\wx-2.8-msw-unicode\wx\lib\agw

Is it considered part of wx, or is it sample code, to be copy/paste and
adapted as needed?

It is part of wxPython, as it is distributed in wx.lib.agw, and I am
the creator/maintainer of the agw library.

The code is faster than I realized was possible, and I'm learning a lot from
it.

It could be faster if:

1) There was a better/more intelligent management of the threads in
ThumbnailCtrl;
2) Python didn't have a GIL;
3) The multiprocessing module was a flexible as the thread one. Using
the multiprocessing module in ThumbnailCtrl was one of my intention,
but as far as I understand it cannot be used if the objects involved
in the mutliple processes are not picklable.

But I need a few features it doesn't offer, and the only way I can
acomplish them is by hooking some of the module attributes. Even that has
been very educational, and I'm grateful for the challenge.

But the real question is maintainability. The resulting program could be
much more readable if I can make the changes in (a copy) of the file. But
then, new versions would have to be re-integrated.

1) I can hook into the code, using module attributes
2) I can copy the source code to my project, and edit as needed, till it
fully meets my needs
3) I could submit patches to the code to make my customizations more
straightforward, so that others might be able to do similar things

I'd be happy to explain just what hooks have so far been necessary, but
first I wanted to keep the discussion generic. The same discussion will
apply to other parts of the wxpython install that are apparently
undocumented as mainstream parts of wxpython.

Suggestions?

For every bug you find or to clean up the API or for including a
feature in ThumbnailCtrl (but the same applies to the whole of
wxPython), we will be happy to receive patches. If you would like to
see an interesting feature implemented but you can't easily see how to
code it, please speak out in the mailing list and I (for the agw
library) or Robin or other developers will be happy to see if anything
can be done about it. Patches are, obviously, much more welcome than a
simple feature request as they involve much less work. This is
especially true for the maintainer of wxPython (Robin), as coding new
features without patches adds another burden to the tasks of SWIG-ing,
compiling, checking, building, distributing wxPython on all the
platforms.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

ยทยทยท

On Tue, Apr 28, 2009 at 1:25 AM, Dave Angel wrote: