Add width attribute#8
Conversation
juhakivekas
left a comment
There was a problem hiding this comment.
Let's discuss this in the issues before merging :)
dc4ec66 to
1d82f23
Compare
|
Please Review :) |
e2ff084 to
8a64212
Compare
| self._newrow() | ||
| return self.body | ||
|
|
||
| def reformat(self, body, n=16): |
There was a problem hiding this comment.
It doesn't need to be this complicated. Just find the number 16 from Render.py and make it not hardcoded. For example replace all occurencies of 16 with self.bytewidth and set that variable when constructing the Render object. This way there's no need to compile the regular expressions, find strings and do all the reformatting that takes a lot of time (you mentioned this was an issue?). As a side effect the format (addresses, ascii conversion etc.) will match the original
There was a problem hiding this comment.
Yes. I tried the approach you are suggesting first but then the code runs slowly on my machine. I don't know if it's a problem with my machine or not. Please tell me if by changing those lines the code runs the same in your machine. I would be happy to implement that since it's easier :)
|
Please review |
a16cb80 to
2b62b0f
Compare
Adds width attribute which allows user to specify number of bytes printed per line
Adds width attribute which allows user to
specify number of bytes printed per line
Closes #3