Problem Cron-Job using Python-Script

Andreas Penzel mail at
Wed Apr 23 11:19:48 CEST 2003

"Andreas Penzel" <mail at> schrieb im Newsbeitrag
news:b7jeem$1l5i0$1 at
> Hello!
> I have a Python-Script to create Log-Files und work with them.
> Very well.
> But if I start the Script with Cron it works not correct.
> I often use os.system() to send commands to the shell including paths from
> the os.
> Could this be the problem?
> And if, how to solve?

I think it happens here:

os.system("iptables -L -v > /path/logfile.txt")

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?

- Andreas

More information about the Python-list mailing list