I'm trying to call a python script with a hexadecimal address, then add some offset to it:
import argparse
def main(number):
print(number+1234)
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--input",type=int)
main(number=parser.parse_args().input)
Unfortunately, I have a type mismatch I can't seem to fix:
$ python hex.py --input=0x000000ab
usage: hex.py [-h] [--input INPUT]
hex.py: error: argument --input: invalid int value: '0x000000ab'
I must be missing some straightforward solution here.