using marshal module

Jason Stokes jstok at bluedog.apana.org.au
Wed Feb 2 01:22:48 EST 2000


Christine Davis wrote in message <3897af70$1 at news.actrix.gen.nz>...
>Hi All,
>
>I am new to python (but old(er) to C++);  and trying to get a script to
>work.  What it is meant to do, is reads in a file,  config.db and then
>changes the values of one of the fields, and write the revised contents
>back.  if I call dump(<array where file contents loaded to>, <name of file
>pointer>) no change seems to take place.  (The field isn't changed,  nor
>does the field get concatenated at the end.


While the other posters have cleared this up, you might consider using a
different strategy.  For example, you can create a persistent dictionary
with the dbm series of modules, that will automatically update when changed
without explicit management.






More information about the Python-list mailing list