Harold Fellermann <[EMAIL PROTECTED]> wrote:
> I need to create a temporary file and I need to retrieve the path
> of that file. os.tmpnam() would do the job quite well if it wasn't
> for the RuntimeWarning "tmpnam is a potential security risk to your
> program". I would like to switch to os.t
Chris Lambacher wrote:
> You should be able to find exactly what you need in the tempfile module.
> http://docs.python.org/lib/module-tempfile.html
thanks! tempfile.NamedTemporaryFile() is exaclty what I have been
looking
for. Using python for such a long time now, and still there are unknown
goo
Harold Fellermann wrote:
> Maric Michaud wrote:
>
>>Le Jeudi 08 Juin 2006 15:30, Harold Fellermann a écrit :
>>
>>>to os.tmpfile() which is supposed to be safer, but I do not know how to
>>>get
>>>the path information from the file object returned by tmpfile(). any
>>>clues?
>>
>>There is no path
You should be able to find exactly what you need in the tempfile module.
http://docs.python.org/lib/module-tempfile.html
os.tmpfile() is no good whether you want the filename or not since on Windows
it is likely to break if you are not a privileged user. Its a windows
problem, not an actual bug i
Well, I never used gnuplot and I didn't use Tkinter for a while, but :
Le Jeudi 08 Juin 2006 16:44, Harold Fellermann a écrit :
> tmp = os.tmpnam()
> gnuplot = subprocess.Popen(
> "gnuplot", shell=True,
> stdin=subprocess.PIPE, stdout=file(tmp,"w")
>
Maric Michaud wrote:
> Le Jeudi 08 Juin 2006 15:30, Harold Fellermann a écrit :
> > to os.tmpfile() which is supposed to be safer, but I do not know how to
> > get
> > the path information from the file object returned by tmpfile(). any
> > clues?
> There is no path for tmpfile, once it's closed,
Le Jeudi 08 Juin 2006 15:30, Harold Fellermann a écrit :
> to os.tmpfile() which is supposed to be safer, but I do not know how to
> get
> the path information from the file object returned by tmpfile(). any
> clues?
There is no path for tmpfile, once it's closed, the file and its content are
lost
Hi,
I need to create a temporary file and I need to retrieve the path of
that file.
os.tmpnam() would do the job quite well if it wasn't for the
RuntimeWarning
"tmpnam is a potential security risk to your program". I would like to
switch
to os.tmpfile() which is supposed to be safer, but I do not