if I have an array of "stop" words, and I want to replace those values
with something else; in a string, how would I go about doing this. I
have this code that splits the string and then does a difference but I
think there is an easier approach:
E.g.
mystr =
kljsldkfjksjdfjsdjflkdjslkf[BAD]Kkjkk
With this code, ignore/replace still generate an error
# Encode to simple ascii format.
field.full_content = field.full_content.encode('ascii',
'replace')
Error:
[0/1] 'ascii' codec can't decode byte 0xe2 in position 14317: ordinal
not in ran
ge(1
On Jan 14, 5:58 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> BerlinBrown schrieb:
>
> > Is it possible to just build the binary content of a zip file. I want
> > to create the content in memory (e.g. return binary data) and then get
> > those byt
Is it possible to just build the binary content of a zip file. I want
to create the content in memory (e.g. return binary data) and then get
those byte strings representing the zip file? Is that possible?
Or could I possibly override functions in the zip class.
1. Create a zip file object (e.g.