On Fri, 2002-12-06 at 23:51, Chuck Esterbrook wrote:
> The "tempdir" variable of the Python standard module "tempfile" gets set
> by PSP:
> Consequently, when I use mktemp() in my own code, my temporary files
> land in .../Cache/PSP/ rather than something like ~/tmp or /tmp like I
> would expect. Furthermore, they seem to disappear on me, e.g., I get
> "IOError: [Errno 2] No such file or directory" at some point when
> trying to open them. I think that happens after I restart the app
> server, but it shouldn't happen at all.
Actually, I think the file is supposed to disappear when the process
ends. That's why its a temp file. Check the docs, but if that's your
main problem, I don't think changing the directory will help.
BTW, the PSP thing was put in because PSP needs to use a temp file that
it can "rename" later, which actually means move. The location of the
tempfile has to be on the same filesystem (read 'computer') as the
target rename file. The target is within the Webware installation
directory, so the tempfile directory and the Webware directory need to
be in the same filesystem. PSP doesn't need the tempdir to be in
PSP/Cache, just somewhere nearby.
If you want to set it to Webware/temp or something that's fine by PSP.
Does that help?