Creating GUID

Derek Atkins warlord at MIT.EDU
Wed Jun 5 11:49:56 EDT 2013

"Tom Lofts" <dev at> writes:

> Hi Jonas,
> This is another recent addition, so again you'll need at least Gnucash 2.5.1. This introduces a GUIDString class which will convert a GUID to a string as follows:
> guid_sting = 'a3817efd668585e2f4431e2996683fd1'
> account_guid = gnucash.gnucash_core.GUID()
> gnucash.gnucash_core.GUIDString(guid_string, account_guid)
> You can see an example of this code in the getAccount method at
> As an aside, I'm not entirely happy about the GUIDString class, as this should really be implemented as a method of the GUID class rather than it's own class. Any suggestions from an experinced Pythoner would be much appreciated - the relevent class is defined in 

I don't understand why you cannot wrap the string_to_guid C function as
a method of the GUID object?

> Kind regards,
> Tom


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list