Replaced Python 3 import tests by try-except blocks

This removes errors from PyDev
Version number: replaced map() by a generator