I am writing a database front end as a cgi script, and am storing information from the user form into different temp files. At the moment for some reason one of the files is being created, but the script can't find it, I've checked all the files are in the correct folders. I have also checked that the file is open in the 'w' mode, so I am at a bit of a loss.

here's the code I use to create the file:

molfile_temp = TEMPFILES str(os.getpid()) + "_sdf.mol

here's what I do with it next:

command = 'cat' + molfile_temp + ' | ' + "inline_to_mol > " + molfile_temp

all that goes on above is I pass the contents of molfile_temp through another programme to change it's contents.

If anyone has any ideas why this file cannot be found once it has been created could they please help me.