I get an error
IndentationError: expected an indented block
in line line 3
answer = subprocess.check_output([\'/home/dir/
Python requires indentation to indicate code that is conditional under for loops, while loops, if and else statements, etc. Generally, this is code that runs contingent on logic before a colon.
Most coders use four spaces for indentation.
Tabs are a bad idea because they may create different amount if spacing in different editors. They're also potentially confusing if you mix tabbed indentation with spaced indentation. If you're using an IDE like Eclipse or Eric, you can configure how many spaces the IDE will insert when you press tab.
I think your code should be:
import subprocess
while True:
answer = subprocess.check_output(['/home/dir/final/3.sh'])
final = int(answer) // int('1048576')
print final