Python3 courtesy of www.pythonconverter.com
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#=============================================================================
|
||||
import StringIO
|
||||
import io
|
||||
|
||||
#=============================================================================
|
||||
class Data:
|
||||
|
||||
@@ -24,7 +24,7 @@ class Error ( Exception ):
|
||||
|
||||
exception.add( msg )
|
||||
|
||||
raise exception, None, trace
|
||||
raise exception.with_traceback(trace)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
@staticmethod
|
||||
@@ -34,7 +34,7 @@ class Error ( Exception ):
|
||||
newError = Error( str( exception ) )
|
||||
newError.add( msg )
|
||||
|
||||
raise newError, None, trace
|
||||
raise newError.with_traceback(trace)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
def __init__( self, msg ):
|
||||
|
||||
@@ -21,7 +21,7 @@ def fimport( filePath ):
|
||||
# Create a new module and exec the code in it's context.
|
||||
m = imp.new_module( rootName )
|
||||
m.__file__ = absPath
|
||||
exec code in m.__dict__
|
||||
exec(code, m.__dict__)
|
||||
|
||||
# Return the module object.
|
||||
return m
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Dump hex bytes to a table.
|
||||
#
|
||||
#===========================================================================
|
||||
import StringIO
|
||||
import io
|
||||
|
||||
#===========================================================================
|
||||
def dump( buf ):
|
||||
|
||||
Reference in New Issue
Block a user