Make necessary changes for Python 3 in joint_control #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes have intentionally been kept minimal to make them easier to verify. The Notebooks would likely benefit from a re-run afterwards though, to upgrade their internal version numbers.
The fixes are as follows:
print(data)
instead ofprint data
, as print became a function in Python 3 instead of a keyword. Also f-Strings have been used, assuming a non-EOL-Python (supported since 3.6), since they are shorter than a.format()
.open(filename, 'rb')
forpickle.load
since the latter requires a function returning bytes instead of strings so the file has to be opened in binary mode.ModuleNotFoundError: No module named 'hello'
results.import future
has been dropped since it is obsolete and unused and the shebang has been dropped since the file has no main function.listdir()
-Function returns a list in arbitrary (undefined and may change from run to run) order. This has been resolved by simply sorting it.