Read model code from file in manner compatible with Python 2.7