On Tue, 2005-04-05 at 11:33 -0700, Danny Yoo wrote:
>
> > > I have this dictionnary :
> > >
> > > a={'partition': u'/export/diskH1/home_evol/ricquebo',
> > > 'rsmFirstname': u'Fran\xe7ois',
> > > 'rsmLastname': u'Ricquebourg',
> > > 'size': u'8161222.0',
> > > 'size_max': '1'}
> > >
> > > and
> Are you trying to send it off to someone else as a part of an XML
> document? If you are including some byte string into an XML document,
> you can encode those bytes as base64:
>
> ##
> >>> bytes = 'Fran\xe7ois'
> >>> encodedBytes = bytes.encode('base64')
> >>> encodedBytes
> 'RnJhbudvaXM=\
> > I have this dictionnary :
> >
> > a={'partition': u'/export/diskH1/home_evol/ricquebo',
> > 'rsmFirstname': u'Fran\xe7ois',
> > 'rsmLastname': u'Ricquebourg',
> > 'size': u'8161222.0',
> > 'size_max': '1'}
> >
> > and I'd like to *serialize* it with pickle and that the output format
> > w
Kent Johnson wrote:
BRINER Cedric wrote:
unicode(pickle.dumps(a)) doesn't work !
pickle.dumps() doesn't return a value, it puts the data into 'a' which
must be a file-like object.
Oops, pickle.dumps() does return a value and the parameter is the object to be pickled. I even knew
that before I se
BRINER Cedric wrote:
hi,
I have this dictionnary :
a={'partition': u'/export/diskH1/home_evol/ricquebo',
'rsmFirstname': u'Fran\xe7ois',
'rsmLastname': u'Ricquebourg',
'size': u'8161222.0',
'size_max': '1'}
and I'd like to *serialize* it with pickle and that the output format
will be of type un
hi,
I have this dictionnary :
a={'partition': u'/export/diskH1/home_evol/ricquebo',
'rsmFirstname': u'Fran\xe7ois',
'rsmLastname': u'Ricquebourg',
'size': u'8161222.0',
'size_max': '1'}
and I'd like to *serialize* it with pickle and that the output format
will be of type unicode.
unicode(pi