I have a package `__init__.py` that looks something like this:

```
import sys

__required_python_version = (2,6, 0)

if sys.version_info < __required_python_version:
    this_version = '.'.join([str(x) for x in sys.version_info[0:3]])
    required_version = '.'.join([str(x) for x in __required_python_version])
    raise PythonVersionError(this_version, required_version)

class PythonVersionError(Exception):
    def __init__(self, this_version, required_version):
        self.this_version = this_version
        self.required_version = required_version

    def __str__(self):
        return 'Python version %s is invalid.  Must be at least %s' % (self.this_ver, self.required_ver)

```

While I'm certain there is a more elegant way to format those version strings and I could probably get by using a standard exception, my real question is how would I do something like this? Would the best approach be to move my custom exception into a separate file and import it? Or should I wrap the version check in a function that executes when the `__init__` is run? I'm just looking for recommendations on the preferred approach.

Thanks