Gregory Petrosyan wrote:
> I have to write  _simple_  gui library, for embedding into game. My
> first attempt was to use XML

...

> But after reading "Python Is Not Java"
> http://dirtsimple.org/2004/12/python-is-not-java.html  (BTW I'm not a
> Java programmer) I realised that it is actually not cute at all :) (am
> I wrong here?)

Don't do that :)

Don't listen to recommendations for or against a technology based only 
on vague "this is not how we do things around here" reasons. If XML 
suits your need, than use it. It seems it will work fine in situations 
where you need to edit/extend the GUI by external means. If you do it in 
code, you risk that you'll need to change the code every time you want 
to reposition a GUI element. It doesn't matter much if you invent your 
own file format because eventually you'll have to extend it, or write 
support for it, so you could as well use XML from the start.

XML parsing can be a little tedious, but there are many tools that make 
it easier (I've even written one: http://ivoras.sharanet.org/xmldict.py.gz).
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to