Kodi Community Forum
Python versions - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Python versions (/showthread.php?tid=197588)



Python versions - Mark_H - 2014-06-11

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


RE: Python versions - Martijn - 2014-06-11

Only 2.x


RE: Python versions - Mark_H - 2014-06-25

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

All working now.