import os # first scan a page scanning = "scanimage --resolution 300 --mode gray -o reading.png" os.system(scanning)