Fix variable naming and extraneous null characters in string#152
Fix variable naming and extraneous null characters in string#152tcwan wants to merge 7 commits intoschodet:masterschodet/nxt-python:masterfrom
Conversation
Merge changes from master repository
Merge updates to main repository
Merge from master nxt-python repository
Merge from upstream
Detabbed source file
| brick_name_str = brick_name_b.decode('windows-1252') | ||
| print("brick_name_b = {0}, brick_name_str = {1}".format(brick_name_b, brick_name_str)) | ||
|
|
||
| brick_name_str = brick_name_b.decode('windows-1252').strip('\00') |
There was a problem hiding this comment.
I think that brick.get_device_info() should return the decoded and stripped value rather than all callers having to do this themselves.
As I recall, the last time I was testing this, it was in fact doing exactly that (tested on Linux and Mac), so I'm not sure why this change would be needed. (I guess I'm going to have to just try it again if I really what to know).
There was a problem hiding this comment.
Hmm. I tested this using nxt-python 2.2.2 which is not the latest master version.
Maybe that is the problem I'm facing, and we need to have a new release version to test with.
Edit: I'm not sure how to test a WIP python library without installing it to the default python library path.
There was a problem hiding this comment.
use the PYTHONPATH environment variable
There was a problem hiding this comment.
we need to have a new release version to test with.
There was a problem hiding this comment.
Will the new release still be python2.7 compatible?
Python 2 is still the default python interpreter for most OSes.
There was a problem hiding this comment.
according to the readme of this project, no, it will not be python2 compatible
There was a problem hiding this comment.
I see. So in that case, I'll still need to maintain my own version of nxtfilemgr for 2.2.2.
|
I guess I'll close this pull request since it is not really needed due to nxt-python updates for python3 compatibility. |
Uh oh!
There was an error while loading. Please reload this page.