Kodi Community Forum

Full Version: Python versions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please forgive if there's a reference I haven't found yet.

I'm writing my first addon - but I'm not sure how to cope with potentially different versions of Python. I'd like my addon to work on as many variants as possible. I need to use Python's urllib (and urllib2) that was refactored between 2.x and 3.x

So how do I know which syntax to use ? (or do I somehow provide two python scripts that are selected according to the version of python on the system (and how is that cotrolled ?)

Many thanks
Only 2.x
(2014-06-11, 06:48)Martijn Wrote: [ -> ]Only 2.x
Sorry, I meant to say "Thanks" Smile

All working now.