[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

[python] dictionary/class <-> xml



Hejsa

Jeg er ved at lave en applikation i python og har brug for at gemme forskellige informationer (fx preferences) i xml. Det er ikke voldsomme datamængder så hastighed er ikke altafgørende. Derimod vil jeg rigtig gerne have noget som *ikke* kræver installation af eksterne biblioteker, da dette ville gøre installation af mit program lidt mere besværligt. Jeg vil også gerne have noget som gør noget i retningen af følgende rimeligt smertefrit (det bliver nok en kende mere OO, det er blot for at illustrere hvad jeg føler jeg leder efter)

dict = xml2dict('file.xml')
dict2xml(dict,'file.xml')

Har kikket på en masse forskellige løsninger, men det virker altsammen lidt voldsomt til mit brug, og jeg kan ikke gennemskue hvad der er en standard del af python.

Jeg har (som det måske fremgår) ikke den store erfaring i det hele taget med skrive/læse "tilstandsdata" i python, så hvis jeg er helt ved siden af, ville jeg være interesseret i noget læsning af strategier til dette formål.

På forhånd tak.

--
peace, love & harmony
Atte

http://www.atte.dk      | quintet:      http://www.anagrammer.dk
                        | compositions: http://www.atte.dk/compositions


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-04-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *