Problem Cron-Job using Python-Script
Mathias Waack
mathias-usenet at valpo.de
Wed Apr 23 05:35:11 EDT 2003
"Andreas Penzel" <mail at andreas-penzel.de> wrote:
> os.system("iptables -L -v > /path/logfile.txt")
Is iptables in the PATH? Try calling iptables with the full path. And
maybe try capturing stderr.
> The file logfile.txt in /path is after running the script empty.
> Is there a other way to become the result from iptables -L -v in
> a file?
Yes, look at the popen functions.
Mathias
More information about the Python-list
mailing list