Re: guid's in python

2007-09-25 Thread kernel1983
base32 base64? On Sep 26, 4:10 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > http://www.djangosnippets.org/snippets/335/ > > On 25 сент, 00:52, Leo Shklovskii <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I'm trying to represent an Active Directory's user guid in Django. In > > AD, its a 128 bi

Re: guid's in python

2007-09-25 Thread Alex Koshelev
http://www.djangosnippets.org/snippets/335/ On 25 сент, 00:52, Leo Shklovskii <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to represent an Active Directory's user guid in Django. In > AD, its a 128 bit integer that I can pull out with using the ldap > library. When I access the guid, python tr

Re: guid's in python

2007-09-25 Thread Leo Shklovskii
Thanks Tim! That's a cool way of looking at it. I don't actually need to pass the uuid to a browser via JSON, I just need to store the uuid as a member field of an object in my db and be able to provide a fixture with it. What I've ended up doing is importing the uuid library (which can be fo

Re: guid's in python

2007-09-25 Thread Tim Chase
>> I've been able to dig into this a little bit more and it >> looks like django.utils.simplejson.decoder doesn't support >> the '\x' escape character. Is this an intentional omission, >> a bug in Django, or just me misunderstanding Python? > > JSON does not support the '\x' escape; see json.org

Re: guid's in python

2007-09-25 Thread James Bennett
On 9/24/07, Leo Shklovskii <[EMAIL PROTECTED]> wrote: > I've been able to dig into this a little bit more and it looks like > django.utils.simplejson.decoder doesn't support the '\x' escape > character. Is this an intentional omission, a bug in Django, or just me > misunderstanding Python? JSON d

Re: guid's in python

2007-09-24 Thread Leo Shklovskii
I've been able to dig into this a little bit more and it looks like django.utils.simplejson.decoder doesn't support the '\x' escape character. Is this an intentional omission, a bug in Django, or just me misunderstanding Python? -- --Leo Leo Shklovskii wrote: > Hi, > > I'm trying to represen

guid's in python

2007-09-24 Thread Leo Shklovskii
Hi, I'm trying to represent an Active Directory's user guid in Django. In AD, its a 128 bit integer that I can pull out with using the ldap library. When I access the guid, python treats it as a string with most of the characters escaped, so something like: "\xdd3\x9e0\xd9\xf4\x93B\x90\xdehDe