Josiah Carlson jcarlson at
Thu Jan 22 17:59:45 CET 2004

On Thu, 22 Jan 2004 15:39:47 +0100
Rik van der Helm <HAALrvanderhWEG at> wrote:

> Hello,
> I am trying to make a backupscript in python, which I want to manage via a 
> webform (cgi). In my script I use os.system to execute the following 
> shellscript:
> "cdrecord -s -dev=0,1,0 -blank=fast -speed=2 fs=8m file.tgz"
> When I execute the pythonscript in the shell, it gets executed well and I 
> get some output from cdrecord. Which I don't understand because I put 
> cdrecord at silent (-s !) I thought.
> When I execute the pythonscript in a webbrowser via cgi, cdrecord also gets 
> executed well but I get an 'Internal Server Error' of Python and in 
> '/var/log/httpd/error_log' it says:
> "malformed header from script. Bad header=Cdrecord 1.11a19 etc....."
> I think I understand what is going wrong. Apache tries to print the output 
> of cdrecord and finds something wrong and stops executing the script. Is 
> this correct ? If this is correct how do I get cdrecord stop making output 
> texts ?
> All suggestions are welcome
> Thanks, Rik

"cdrecord -s -dev=0,1,0 -blank=fast -speed=2 fs=8m file.tgz > /dev/null"

More information about the Python-list mailing list