Re: [Webware-devel] PSP issue with mktemp()

2002-12-07 Thread Jay Love
Yeah, you're right. tempfile.mktemp() just provides a filename. tempfile.TemporaryFile() gives the autodeleted open filehandle I was thinking of. Chuck, why don't we add a MiscUtils class that generates tempfiles? On Sat, 2002-12-07 at 02:19, Ian Bicking wrote: > On Sat, 2002-12-07 at 00:01, J

Re: [Webware-devel] PSP issue with mktemp()

2002-12-06 Thread Ian Bicking
On Sat, 2002-12-07 at 00:01, Jay Love wrote: > 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. I don't believe that's the case, I think it's

Re: [Webware-devel] PSP issue with mktemp()

2002-12-06 Thread Chuck Esterbrook
On Friday 06 December 2002 10:01 pm, Jay Love wrote: [snip] > 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. I never knew that. The Python

Re: [Webware-devel] PSP issue with mktemp()

2002-12-06 Thread Jay Love
On Fri, 2002-12-06 at 23:51, Chuck Esterbrook wrote: > The "tempdir" variable of the Python standard module "tempfile" gets set > by PSP: > > PSP/ServletWriter.py:43: > tempfile.tempdir=os.path.dirname(self._pyfilename) > > Consequently, when I use mktemp() in my own code, my temporary files >

Re: [Webware-devel] PSP issue with mktemp()

2002-12-06 Thread Jay Love
Someone added that change to PSP to fix something specific. I think they needed to be able to do something like run Webware on an NFS share, and mktemp needed to be setup a certain way. If that person's still around, maybe they'll speak up. I dunno, either way. On Fri, 2002-12-06 at 23:51, Chuc

[Webware-devel] PSP issue with mktemp()

2002-12-06 Thread Chuck Esterbrook
The "tempdir" variable of the Python standard module "tempfile" gets set by PSP: PSP/ServletWriter.py:43: tempfile.tempdir=os.path.dirname(self._pyfilename) Consequently, when I use mktemp() in my own code, my temporary files land in .../Cache/PSP/ rather than something like ~/tmp or /tmp like