Use a Thread to reload a Module?

Hendrik van Rooyen mail at microcorp.co.za
Mon Dec 25 03:19:35 EST 2006


"Gregory Piñero" <gregpinero at gmail.com> wrote:

To: "Hendrik van Rooyen" <mail at microcorp.co.za>

On 12/24/06, Hendrik van Rooyen <mail at microcorp.co.za> wrote:
> "Gregory Piñero" <gregpinero at gmail.com> wrote:
...
> open( filename[,flag='c'[,protocol=None[,writeback=False[,binary=None]]]])
>
> Open a persistent dictionary. The filename specified is the base filename for
> the underlying database. As a side-effect, an extension may be added to the
> filename and more than one file may be created. By default, the underlying
> database file is opened for reading and writing. The optional flag parameter
has
> the same interpretation as the flag parameter of anydbm.open.
>
> hth - Hendrik

So how is that better than using marshal as I am now?  Is it faster to
load?  Perhaps I could do speed tests to compare.

-Greg

I doubt it - originally I asked the question about a persistant dict because I
thought that
the scheme of periodically updating your live data could fruitfully be replaced
by a
"trickle" updating scheme to keep the stuff in better sync, rather than taking
big lumps
at a time...

This may or may not be feasible - depends on what you are actually doing and if
it can in fact
be updated a little bit at a time instead of in a large lump at longer
intervals.

- Hendrik




More information about the Python-list mailing list