Skip to content

Commit

Permalink
update for Python2/3
Browse files Browse the repository at this point in the history
  • Loading branch information
algrant-arm committed Feb 1, 2025
1 parent e2a1e2c commit aac56ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions python/csregistration.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
limitations under the License.
"""

from __future__ import print_function

from csaccess import *

class CSRegisterError(Exception):
Expand Down Expand Up @@ -77,12 +79,12 @@ def setup_board(devices):
# Register TC2 - remove this for more `generic' interface
board['registration'](devices)

print "Registration Complete: %d" % cs_registration_complete()
print "Error Count: %d" % cs_error_count()
print("Registration Complete: %d" % cs_registration_complete())
print("Error Count: %d" % cs_error_count())

cs_cti_diag()
print "CSDEMO: Registration Complete."
print("CSDEMO: Registration Complete.")
return board

if __name__ != '__main__':
print "We're running inside a module"
print("We're running inside a module")
2 changes: 1 addition & 1 deletion python/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CSINCS= $(INC_DIR)/csaccess.h \
$(INC_DIR)/cs_trace_sink.h \
$(INC_DIR)/cs_trace_source.h \
$(INC_DIR)/csregisters.h \
$(DEMO_INC_DIR)/csregistration.h
$(INC_DIR)/csregistration.h

####################################
#
Expand Down
2 changes: 2 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
limitations under the License.
"""

from __future__ import print_function

from distutils.core import setup, Extension

"""
Expand Down

0 comments on commit aac56ae

Please sign in to comment.