Fix tutorial for python 3

This commit is contained in:
Robert Taylor 2022-12-06 01:50:49 +00:00
parent 449ee2e81e
commit 198d5ce035
2 changed files with 5 additions and 6 deletions

View File

@ -16,8 +16,7 @@ ninja = ">=1.10"
cmake = ">=3" cmake = ">=3"
[tool.poetry.scripts] [tool.poetry.scripts]
blif2vst = 'Coriolis:blif2vst'
blif2vst = 'Coriolis:blif2vst'
cx2y = 'Coriolis:cx2y' cx2y = 'Coriolis:cx2y'
cyclop = 'Corilis:cyclop' cyclop = 'Corilis:cyclop'
tutorial = 'Coriolis:tutorial' tutorial = 'Coriolis:tutorial'
@ -25,6 +24,6 @@ unittests = 'Coriolis:unittests'
yosys_coriolis = 'Coriolis:yosys_coriolis' yosys_coriolis = 'Coriolis:yosys_coriolis'
[build-system] [build-system]
requires = ["poetry-core", "setuptools", "cmake"] requires = ["poetry-core", "setuptools", "cmake", "patchelf"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"

View File

@ -12,7 +12,7 @@ try:
import CRL import CRL
import Unicorn import Unicorn
import Tutorial import Tutorial
except ImportError, e: except ImportError as e:
serror = str(e) serror = str(e)
if serror.startswith('No module named'): if serror.startswith('No module named'):
module = serror.split()[-1] module = serror.split()[-1]
@ -24,7 +24,7 @@ except ImportError, e:
print( ' Under RHEL 6, you must be under devtoolset-2.' ) print( ' Under RHEL 6, you must be under devtoolset-2.' )
print( ' (scl enable devtoolset-2 bash)' ) print( ' (scl enable devtoolset-2 bash)' )
sys.exit(1) sys.exit(1)
except Exception, e: except Exception as e:
print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' ) print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' )
print( ' modules. Something may be wrong at Python/C API level.\n' ) print( ' modules. Something may be wrong at Python/C API level.\n' )
print( ' {}'.format(e) ) print( ' {}'.format(e) )
@ -108,6 +108,6 @@ if __name__ == '__main__':
if cell: unicorn.setCell(cell) if cell: unicorn.setCell(cell)
unicorn.show() unicorn.show()
ha.qtExec() ha.qtExec()
except Exception, e: except Exception as e:
helpers.io.catch( e ) helpers.io.catch( e )
sys.exit(0) sys.exit(0)