[PyKDE] PyQt port of fileiconview?
Greetings- I just starting writing a port of the Qt example program 'fileiconview' so that I can adapt it for a project I'm working on. Has anybody done this yet? I didn't see this in the PyQt examples directories. If not, I can contribute the example back to PyQt if desired (although it looks like I might need a little bit of help with a couple aspects of the effort). Thanks, Don ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Iterators / generators for QList(Box, View) and other?
On Wednesday 02 April 2003 2:40 pm, Torsten Marek wrote: > Hello there, > > I just wanted to ask if some version of PyQt will support iterators for > Listboxes, Listviews etc. through generator functions or the __iter__ > protocol? I know both are Python 2.2+ specific, but are there any plans > to implement them, Phil? Is anybody of you interested in having them? A > simple iterator for a QListBox using generators would look like this > (works only with Python 2.2 or greater): > > > > from __future__ import generators # python2.2 only > > def ListBoxIterator(listbox): > item = listbox.firstItem() > while item: > yield item > item = item.next() > return # no special need to do this > > Don't know about generators yet? Read > http://www.python.org/doc/2.3a2/whatsnew/section-generators.html > to get a fast intro. See the SIP Roadmap. Phil ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] Iterators / generators for QList(Box, View) and other?
Hello there, I just wanted to ask if some version of PyQt will support iterators for Listboxes, Listviews etc. through generator functions or the __iter__ protocol? I know both are Python 2.2+ specific, but are there any plans to implement them, Phil? Is anybody of you interested in having them? A simple iterator for a QListBox using generators would look like this (works only with Python 2.2 or greater): from __future__ import generators # python2.2 only def ListBoxIterator(listbox): item = listbox.firstItem() while item: yield item item = item.next() return # no special need to do this Don't know about generators yet? Read http://www.python.org/doc/2.3a2/whatsnew/section-generators.html to get a fast intro. Greetings, Torsten pgp0.pgp Description: PGP signature
Re: [PyKDE] PyKDE Change in Plans
On 02-Apr-03 Gerard Vermeulen wrote: > Hmm..., > I was wondering if it is possible to introduce a feature > %feature SIP_FOOLS_DAY > where build.py (or my distutils scripts) have to figure > out if sip predates 2003-04-01 or not. Sure - Take the output of sip -V and test it to determine if you need the old style or new style naming, then pass a -D define to your code when compiling or set a feature conditional (<= 3.5 or < snapshot-20030401 for old style). There is a #define Phil referenced (SIP_MAJOR_NR) that you can test in C++ code (it's in the 3/15 snapshot), but I think you'll only be able to distinguish 3 from 4, and the incompatibility will be in later versions of 3 already. It's in siplib/sip.h. I'm resistant to doing it for PyKDE because it adds some other complications and it appears at the moment that PyKDE for 3.6 (when 3.6 is released) won't be backwards compatible with PyKDE for 3.5. It's easy to add the #ifdefs if you need them (all the changes are in C++ code in %VirtualCode blocks). PyQt shouldn't have a problem as long as you match the PyQt and sip versions. I like the feature name though :) Jim ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde