Skip to content
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

Information on Python version #40

Closed
angussmitchell opened this issue Feb 7, 2019 · 8 comments
Closed

Information on Python version #40

angussmitchell opened this issue Feb 7, 2019 · 8 comments

Comments

@angussmitchell
Copy link

Hi, If possible I'd like someone to add some documentation on on version of python that works with the Navio2. For example, can I run everything in Python 2 and 3? If so what version is a minimum requirement for each (i.e. is 3.5 a minimum requirement?)

@staroselskii
Copy link
Contributor

Hi!

If I remember correctly, it's compliant with both versions. The examples don't use any fancy Python 3 features, so I don't think that 3.5 is a must. This is usually tested on Raspbian's current version to work with both Python 2 and 3. Thanks for reminding that we need to add a .travis.yml file to the repo to actually test it :)

@angussmitchell
Copy link
Author

Thanks for the clarification!

A related query is - what version of python (2 and 3) does the emlid raspberry image ship with? I'd love to use some of the more advanced python3 features (such as asyncio) with the Navio drivers without breaking anything.

@staroselskii
Copy link
Contributor

@angussmitchell

It's Python 2.7.13 and Python 3.5.3.

@angussmitchell
Copy link
Author

Thanks for that!

@angussmitchell
Copy link
Author

Hi I'd like to reopen this issue: the Navio2 python code does not work with Python3. the obvious "print" statements don't translate to Python3. There also seems to be an issue with the smbus module. I'll post any findings I have here - I believe it won't be too hard to convert the code to Python3.

The reason I am so concerned with using Python3, is that it is now faster than Python2 - and has other substantial advantages including concurrency using asyncio.

@staroselskii
Copy link
Contributor

Sure, feel free to open a PR with the changes. We'll be more than ready to review and merge them.

@staroselskii
Copy link
Contributor

#27

There's also this PR with a lot of Python code than can be useful.

@angussmitchell
Copy link
Author

Thanks for the help, I'm not sure how to do a "PR" at this stage but will investigate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants