How to put the input file as source, instead off typing the file filename
<p>I am doing a simple copy off an file. With this script:</p>

<pre><code>inputFile = (file.bin)
print "Reading data from: ", inputFile

print 'Input File Size:', os.path.getsize(inputFile)
f = open(inputFile, 'rb+')
bin = f.read()
binArray = array('c', bin)
print 'Bin Size:', len(binArray)




copyFile = open( 'Copy of ' + inputFile, 'wb+')
binArray.tofile(copyFile)
#copyFile.write(bin)
copyFile.close


print 'Output File Size:', os.path.getsize('Copy of ' + inputFile)

print 'Missing Bytes:', os.path.getsize(inputFile) - os.path.getsize('Copy of ' + inputFile)
f.close()
</code></pre>

<p>Well that works fine, but I wanna automate the script, so I dont have to put the file name in the script each time.</p>

<p>I tried:</p>

<pre><code>inputFile = ('...')
</code></pre>

<p>Then I get an permission denied error:</p>

<pre><code>   f = open(inputFile, 'rb+')
IOError: [Errno 13] Permission denied: '...'
</code></pre>

<p>Qustion is, is there any way to put the loaded file as source, without putting the whole name there.?</p>
