Timeline for answer to Byte manipulation in Python by JBernardo
Current License: CC BY-SA 3.0
Post Revisions
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 4, 2012 at 14:54 | vote | accept | Community Bot | ||
| Aug 4, 2012 at 14:54 | comment | added | user485498 | Thanks all! I think I did it. I did the +=256 wrap around. | |
| Aug 4, 2012 at 14:50 | history | edited | JBernardo | CC BY-SA 3.0 |
edited body
|
| Aug 4, 2012 at 14:47 | comment | added | JBernardo | @JJG You can add 256 for negative numbers to wrap around | |
| Aug 4, 2012 at 14:45 | comment | added | JBernardo |
@JJG that's because you're using a number smaller than 83 and chr can't handle negative numbers
|
|
| Aug 4, 2012 at 14:42 | comment | added | user485498 | OK. Well, I'm getting an error: ValueError: chr() arg not in range(256) . I don't know why this is happening. Also I'm using Pytohn 2.7 | |
| Aug 4, 2012 at 14:40 | history | edited | JBernardo | CC BY-SA 3.0 |
added 140 characters in body; added 1 characters in body
|
| Aug 4, 2012 at 14:38 | comment | added | JBernardo | @JJG You store your bytes in strings or bytestrings (Py3k), right? So, if the result is printable, it'll will appear this way. | |
| Aug 4, 2012 at 14:30 | history | answered | JBernardo | CC BY-SA 3.0 |