That's something for which I should strive. I've never written "polyglot" scripts longer than 1 file with 100 lines. Writing compatible syntax is feasible without too much hassle, but most problems I encountered were when I wanted to use a library whose API evolved between 2 and 3...
Do you have experience with the `six` library[0]? I've read a few times about it recently and it seems a convenient way to write portable code. I still wait for an opportunity to use it!