Python Forum

Full Version: can I run python code from python 3 ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I will explain

I have main code running on python3
I want to use also anoter code I wrote on python2 and import it as a "function"

can I do this?

the import code is base on "pynmea2" - if it's matter (get gps data from modem)

Thanks ,
take a look at: https://docs.python.org/3/howto/pyporting.html
run your code through the converter, and all should be ok
I will try it
Thank you!