In my c1.txt file, i have something like
var0 = '0x000000000000004080'
And in my python mail file:
def getVarFromFile(filename):
import imp
f = open(filename)
global data
data = imp.load_source('data', '', f)
f.close()
getVarFromFile('c1.txt')
The var0 is a 72-bit variable, and in my python file, I want to assign that to 12 variable with 6-bit for each, how can I do that?
Since var0 is a hex variable, seems I can't do
x = int(data.var1) & 0x3F
Thanks