I use Python and Envoy. I need to delete all files in a directory. In addition to some files, the directory is empty. In the terminal, it will be:
rm /tmp/my_silly_directory/*
Common sense dictates that in the messenger this means:
r = envoy.run('rm /tmp/my_silly_directory/*')
However:
r.std_err -> "rm: cannot remove `/tmp/my_silly_directory/*': No such file or directory"
Naturally, there are alternatives to using the messenger in this case, I just wonder why this does not work.
Any clues?
source share