Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2008 17:42:43 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-questions@FreeBSD.ORG, gandalf@shopzeus.com
Subject:   Re: Max. number of opened files, efficiency
Message-ID:  <200808131542.m7DFghno073855@lurza.secnetix.de>
In-Reply-To: <48A2F335.6010206@shopzeus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Laszlo Nagy wrote:
 > In fact I do not need any name associated with the file. I just need a 
 > temporary file object, I would like to access it in read write mode and 
 > then throw it.

In that case, why do you use physical (i.e. on-disk) files
at all?  You could simply use memory objects.  If you want
to use file semantics (with read() and write() methods etc.),
you can easily do that in Python with memory objects, too.
See the StringIO and cStringIO modules for details.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"We, the unwilling, led by the unknowing,
are doing the impossible for the ungrateful.
We have done so much, for so long, with so little,
we are now qualified to do anything with nothing."
        -- Mother Teresa



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808131542.m7DFghno073855>