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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -