-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Python syntax errors and undefined names in examples #421
Fix Python syntax errors and undefined names in examples #421
Conversation
Thanks! I'll check this PR together with other PRs later this week. |
Would it be possible to merge the python2 and 3 demos and make them compatible for both versions? With your changes I can imagine that this will work. |
Should be possible. |
Please also take a look at this PR: The two could be merged. I think both PRs improve the python bindings a lot. @chenguoguo I reviewed the PR, it looks good to me. I did not test it though. |
I adapted your changes to my PR (basically I just added the print import), but I cannot get the python2 code to run at all because of import errors. This does not happen for python3, and I dont know why. Any ideas?
|
Are you in the Python or the Python3 directory when you do this? |
I am in the python (for python2) directory. I removed all symlinks and the detector python file, as this should be inside the global system package, not the local one. But the same error also happens on my Python3 example, which should work on both versions I am using this branch as base: I do compile the files in the swig/Python directory and then set Another thing I noticed: The snowboydecoder.py differs from python2 to 3. I think this should be avoided. |
Thank you very much guys! Since Nico have merged the changes to his PR, let's sort things out in his PR: #383 |
Should I also include the travis changes? Those are not yet included in the PR. |
@AtosNicoS please do |
Python 2
$ python2 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
Python 3
$ python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics