How to write variable in a python file then import it in another python file?
I try to create a python file, I named it _Arm64HexDatabase
Then I tried to import it in another python file:
but I thought the import of my another file is failed
How to do that?
I try to create a python file, I named it _Arm64HexDatabase
Code:
hex_mova64w0c0 = "00008052"
hex_mova64w1c0 = "01008052"
...
hex_mova64w30c0 = "1E008052"
hex_mova64w31c0 = "1F008052"
hex_suba64w0w0w0 = "0000004B"
hex_suba64w0w1w1 = "2000014B"
...
hex_suba64w0w30w30 = "C0031E4B"
hex_suba64w0w31w31 = "E0031F4B"
Then I tried to import it in another python file:
Code:
import re
import _Arm64HexDatabase
handle_file1 = open("example1", "rb")
hex_read = handle_file1.read()
handle_file1.close()
hex_read = re.sub(hex_suba64w0w0w0, hex_mova64w0c0, hex_read)
hex_read = re.sub(hex_suba64w0w1w1, hex_mova64w0c0, hex_read)
...
hex_read = re.sub(hex_suba64w0w30w30, hex_mova64w0c0, hex_read)
hex_read = re.sub(hex_suba64w0w31w31, hex_mova64w0c0, hex_read)
but I thought the import of my another file is failed
How to do that?