image - Python: os.system() redirecting stdout to file in home directory fails -


i used following command :

os.system('scanimage > ~/test.pnm') 

but can't find image.

any suggestions?

maybe ~ not expanded. try

 os.system("scanimage > $home/test.pnm") 

and

 os.system("scanimage > /tmp/test.pnm") 

or if running different unix user (root) home not expect.


Comments

Popular posts from this blog

smartface.io - Proper way to change color scheme for whole application -

javascript - three.js lot of meshes optimization -

Email notification in google apps script -