BU-Tools / uHAL_AXI_regmap

Tools for building AXI slave VHDL from uHAL address tables.
Apache License 2.0
4 stars 4 forks source link

python3 compatibility #3

Closed andrewpeck closed 3 years ago

andrewpeck commented 4 years ago

I installed IPBus on my computer but it used the default python installation, which for me was python3..

Running these scripts then does not work with python2 but some minor modifications seem to make it compatible for both python2 and python3, assuming a remotely modern python2 (I think 2.6).

Specifically:

  1. import StringIO replaced with import io
  2. if dict.has_key('key') replaced with if key in dict

I tested both on my computer and on Tesla (which I assume is using python2 by default) and it seems to work ok.. would someone else be able to check this and see if it works ok for them?