I'd like to make it as general as possible - e.g. handle as many versions as possible.

Since version 3 is not backwards compatible with version 2, I want to make sure that I use the right print statement.

Please let me know if you have questions and feel free to share related knowledge having to do with dynamic logic based on what (e.g. libraries) is available.

Suppose I have a script that will run under version 1.x, or 2.x, or 3.x only.

Or a script which requires a library A or a library B.

Thanks!

***EDIT:***

Now ... when it comes to Python (unlike .Net) some libraries like SciPy, Google App Engine keep you glued to particular version. On Linux, Mac Os you can switch between different Python installs on command line. This is why I want to avoid confusion - I want to remember which script is for which version of Python and what libraries it needs. I would rather have it fail in a human-readable way.