Hi Peng,

On Thu, Nov 7, 2013 at 11:58 PM, Peng Wei <[email protected]> wrote:

> I found that new version of gem5 cannot run on python 2.4 because some
> sentences in import.py cannot be supported by python 2.4. I just modified
> the file and changed it to the old version and it worked. But I am not sure
> if this approach can solve the problem forever.
>
> The original new version of src/python/import.py is:
>
>             if os.path.basename(srcfile) == '__init__.py':
>                 mod.__path__ = fullname.split('.')
>                 mod.__package__ = fullname
> *            else:*
> *                mod.__package__ = fullname.rpartition('.')[0]*
>             mod.__file__ = srcfile
>
> I changed it to
>
>             if os.path.basename(srcfile) == '__init__.py':
>                 mod.__path__ = fullname.split('.')
>                 mod.__package__ = fullname
>             mod.__file__ = srcfile
>
> That is: I removed the else part.
>
> Could anybody tell me if it is okay, or it's gonna cause other problems?
>

I had the same issue.  I opted for Python 2.5.6, instead of editing the
file. Have earlier posted this on this mailing list.

-- 
Thank You and Warm Regards,

Chetan Patil,
http://chetanpatil.info
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to