Recently I've been involved in a large scale user interface rewrite for one of our products. The long and short of the story boils down to needing to rewrite code that's essentially unmaintainable in its current state as generated by a developer who's no longer with our company.
We started by investigating existing solutions for UI Design in Python. wxGlade is probably the most notable, but I found its generated code to be overly verbose, its default naming schemes to be cumbersome, and I generally disliked the idea of a new .wxg project file that I'd need to go back to when making layout changes.
I also reviewed and tested XRCed. While closer to what I was after (it parses XML to generate the UI Layout) it still wasn't quite what I had in mind. It did give me some great ideas regarding object structure and layout in general. If you're fond of XML you should definitely check it out.
In the end, I rolled my own solution. Sometimes that's overkill, and sometimes that means you get what you need out of the project. In my case, it's been mostly the later, with a bit of the former mixed in.
I'd like to lead with the disclaimer that the form structure these declarations use grew from some demented corner of my mind. For that reason, there are times where I've conglomerated some of the options for sizers together with some of the options for the actual elements. Initially that may seem confusing, but I found that it allowed me to centralize my declarations in a way that benefitted me long term. I also made the decision to process parts of this structure by type (dictionaries represent a single element, tuples represent rows which can contain one or more elements, and lists represent grids - they typically contain one or more tuples (rows) which in turn contain dictionaries (columns)). Depending on your design background this may seem counter intuitive or overworked. If so, I'm interested in feedback, but you're also under no obligation to use these classes and they work for what we're doing.
Below then, are examples of the Forms generated using this combination of classes. The four forms demonstrated are all available in the FormsDemo attachment. The Ordered Dictionary is necessary if you're using Python 2.6.
Examples




| Attachment | Size |
|---|---|
| FormDemo.py.txt | 27.56 KB |
| odict.py.txt | 46.84 KB |
NewMessage
Fruit Ninja для Samsung
NewMessage
opera mini скачать
NewMessage
опера для телефона скачать opera для телефона opera на телефон
NewMessage
скачать operamini бесплатно опера мини 6.1 скачать бесплатно опера мини
NewMessage
скачать Jimm на мобильный скачать Jimm на мобильный телефон nokia в контакте не открывается
NewMessage
neptyn-servis music-line
NewMessage
energopromresurs promecobezopasnost fujfilms
NewMessage
justbuild ukrtrip biolocate
NewMessage
free-all luck-movie centrheating
NewMessage
tvoya-mashina igrovoj-portal gameboot
NewMessage
ideiremonta tvua massanet
NewMessage
management psy-magic gorodaudi
NewMessage
lifeonwheels tatprominwest sk-sheksna
NewMessage
lucky-angels ski-sportru kalendarist
NewMessage
turkey-tourism.info ant-news andrej-sokolov
NewMessage
retroscoots endem all-photoshop
NewMessage
krasdor spb.cnd.su alternatefuel
NewMessage
rentarate wunderkind-school dckras
NewMessage
asdemi.ru navlife.ru sostare.ru gdevka.ru
NewMessage
aritro.ru nogana.ru razlina.ru
NewMessage
idelist.ru umlator.ru ruchik.ru
NewMessage
kolengi.ru otochen.ru roncov.ru
NewMessage
che ley
NewMessage
au mo via
NewMessage
era mina aut
NewMessage
artic myde mira
NewMessage
min autoska bestm
NewMessage
vor 2str bori
NewMessage
hote spez rikb
NewMessage
bree abca bru ti
NewMessage
опера мини для телефона samsung mini opera для sony ericsson opera mini для lg
NewMessage
Опера Мини для nokia 5800 opera mini для samsung опера мини для самсунг
NewMessage
Скачать opera mini для nokia Опера мини для телефона нокиа скачать opera mini для нокиа
NewMessage
ootdyx.ru uletaems.ru mm-vkusno.ru autofide.ru
NewMessage
Opera Mini Скачать
NewMessage
onion-stank panori stroika199 newss-med
NewMessage
piramidu shirokoe zemnoe
NewMessage
wunderkind-school nogtiuxod spunchers
NewMessage
morrel rentarate dckras
NewMessage
icatconf girlwrestlermovie remontnoe
NewMessage
crackovia biberclub vip-dieta
NewMessage
pigflumap unseo magic-book turkeytwitter
NewMessage
cnodj healthy-ageing africa-travels
NewMessage
northropgrummna stoneholdbooks tervetalo
NewMessage
home-doctor avtomotominsk directfilms
NewMessage
borisel best-computers centurionlinux
NewMessage
rusmart 7pos-metal onlymusic
NewMessage
vishivalka climatblog.info afr-savanna
NewMessage
africancarbontrust dorogoydom wmworker
NewMessage
itf-taekwondo nightech ukrea