"convert" string to bytes without changing data (encoding)

Stefan Behnel stefan_ml at behnel.de
Wed Mar 28 07:25:33 EDT 2012


Peter Daum, 28.03.2012 11:43:
> What I am looking for is a general way to just copy the raw data
> from a "string" object to a "byte" object without any attempt to
> "decode" or "encode" anything ...

That's why I asked about your use case - where does the data come from and
why is it contained in a character string in the first place? If you could
provide that information, we can help you further.

Stefan




More information about the Python-list mailing list