return correct information from a script, but works well on interactive shell. Used a more proper check for Python > 2 instead of the current implementation. Thanks Vishal for the report.