Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58536
| Date | 2013-11-05 18:15 -0500 |
|---|---|
| From | bob gailer <bgailer@gmail.com> |
| Subject | Re: Help me with this code PLEASE |
| References | <l5bc94$roa$1@dont-email.me> <20131105223107.GA99421@cskk.homeip.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2066.1383693356.18130.python-list@python.org> (permalink) |
There is also the shelve module. It uses pickle to marshal a Python object, then stores it in a file under a key. Sample code from the module documentation: import shelve d = shelve.open(filename) # open -- file may get suffix added by low-level library d[key] = data # store data at key (overwrites old data if using an existing key) data = d[key] # retrieve a COPY of data at key (raise KeyError if no such key) del d[key] # delete data stored at key (raises KeyError if no such key) flag = key in d # true if the key exists klist = list(d.keys()) # a list of all existing keys (slow!) -- Bob Gailer 919-636-4239 Chapel Hill NC
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 19:06 +0200
Re: Help me with this code PLEASE Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-05 18:23 +0100
Re: Help me with this code PLEASE mm0fmf <none@mailinator.com> - 2013-11-05 17:33 +0000
Re: Help me with this code PLEASE Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-05 17:41 +0000
Re: Help me with this code PLEASE Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-05 18:53 +0100
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 19:59 +0200
Re: Help me with this code PLEASE Tobiah <toby@tobiah.org> - 2013-11-05 10:11 -0800
Re: Help me with this code PLEASE Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-05 14:01 -0500
Re: Help me with this code PLEASE Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-05 18:02 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 20:09 +0200
Re: Help me with this code PLEASE Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-05 20:10 +0000
Re: Help me with this code PLEASE Cameron Simpson <cs@zip.com.au> - 2013-11-06 09:31 +1100
Re: Help me with this code PLEASE bob gailer <bgailer@gmail.com> - 2013-11-05 18:15 -0500
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 23:36 +0000
Re: Help me with this code PLEASE John Gordon <gordon@panix.com> - 2013-11-05 20:19 +0000
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 21:17 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-05 23:26 +0200
Re: Help me with this code PLEASE John Gordon <gordon@panix.com> - 2013-11-05 22:06 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-06 00:28 +0200
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 22:44 +0000
Re: Help me with this code PLEASE John Gordon <gordon@panix.com> - 2013-11-05 22:54 +0000
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-06 03:14 +0200
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-06 08:49 +0000
Re: Help me with this code PLEASE Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-06 08:57 -0500
Re: Help me with this code PLEASE Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-06 09:27 +0100
Re: Help me with this code PLEASE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-05 21:42 +0000
Re: Help me with this code PLEASE Chris Angelico <rosuav@gmail.com> - 2013-11-06 09:03 +1100
Re: Help me with this code PLEASE Piet van Oostrum <piet@vanoostrum.org> - 2013-11-05 18:15 -0400
Re: Help me with this code PLEASE Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-11-06 00:35 +0200
Re: Help me with this code PLEASE Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-06 00:45 +0000
Re: Help me with this code PLEASE Ben Finney <ben+python@benfinney.id.au> - 2013-11-06 12:46 +1100
Re: Help me with this code PLEASE Grant Edwards <invalid@invalid.invalid> - 2013-11-06 14:50 +0000
Re: Help me with this code PLEASE Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-05 19:32 -0500
csiph-web