Python script to convert strings from hex to bin contained in a txt
<p>I am looking for a simple script possibly in python that can:
-convert a list of 4 bytes Hexadecimal strings to Decimal</p>

<p>Something that would look like"
script.py infile.txt outfile.txt</p>

<pre><code>filename = "infile.txt"
with open(filename, 'r') as f:
    content = f.read()
out = int(content, 16)

f = open('outfile.txt', 'w')
f.write(str(out))
f.close()
</code></pre>

<p>This is what I came up with so far... It works well if infile contains only one line... I still need to figure out to do it line by line...</p>

python hex decimal