import os
import sys

#Python 2 depended modules
try:
    __import__('imp').find_module('pyopenreil')
    from pyopenreil.REIL import *
    from pyopenreil.utils import asm
except ImportError:
    pass


class Reil:

	def __init__(self, mode, *args, **kwargs):
		self.mode = mode
		return


	def symprint(self,app):
		self.widget.Symrwidget.editor.append(app)

	def entry(self):
		self.widget.Symrwidget.editor.clear()
		self.widget.commandWidget.stopButton.setDisabled(False)
		code = self.widget.codeWidget.getCleanCodeAsByte(as_string=True, parse_string=True)
		code = tuple(synt for synt in code.split('\n') if synt)
		try:
			viasyntax = asm.Reader(ARCH_X86,(code),addr = 0)
			store = CodeStorageTranslator(viasyntax)
			irl = store.get_func(0)
			for func in irl.bb_list: self.symprint(str(func).replace(" "*4," "))
		except (ReadError,OSError):
			self.symprint("An error occured when converting instructions into the symbolic form")
		return

Create reil.py