Re: Help on dictionaries...

2020-01-29 Thread Souvik Dutta
How do I connect it with my dictionary On Thu, Jan 30, 2020, 7:03 AM Tim Chase wrote: > On 2020-01-30 06:44, Souvik Dutta wrote: > > Hey I was thinking how I can save a dictionary in python(obviously) > > so that the script is rerun it automatically loads the dictionary. > > This is almost exact

Re: Help on dictionaries...

2020-01-29 Thread MRAB
On 2020-01-30 01:51, Michael Torrie wrote: On 1/29/20 6:14 PM, Souvik Dutta wrote: Hey I was thinking how I can save a dictionary in python(obviously) so that the script is rerun it automatically loads the dictionary. You could use the pickle module for that. See the python.org documentation o

Re: Help on dictionaries...

2020-01-29 Thread Souvik Dutta
Thank you all. On Thu, Jan 30, 2020, 7:25 AM DL Neil via Python-list < python-list@python.org> wrote: > On 30/01/20 2:14 PM, Souvik Dutta wrote: > > Hey I was thinking how I can save a dictionary in python(obviously) so > that > > the script is rerun it automatically loads the dictionary. > > > P

Re: Help on dictionaries...

2020-01-29 Thread Tim Chase
On 2020-01-30 06:44, Souvik Dutta wrote: > Hey I was thinking how I can save a dictionary in python(obviously) > so that the script is rerun it automatically loads the dictionary. This is almost exactly what the "dbm" (nee "anydbm") module does, but persisting the dictionary out to the disk: im

Re: Help on dictionaries...

2020-01-29 Thread DL Neil via Python-list
On 30/01/20 2:14 PM, Souvik Dutta wrote: Hey I was thinking how I can save a dictionary in python(obviously) so that the script is rerun it automatically loads the dictionary. Perhaps a YAML or JSON file (which follow a very similar format and structure to Python dicts), or a 'NoSQL' database

Re: Help on dictionaries...

2020-01-29 Thread Michael Torrie
On 1/29/20 6:14 PM, Souvik Dutta wrote: > Hey I was thinking how I can save a dictionary in python(obviously) so that > the script is rerun it automatically loads the dictionary. You could use the pickle module for that. See the python.org documentation on pickle. Alternatively you could use a js

Help on dictionaries...

2020-01-29 Thread Souvik Dutta
Hey I was thinking how I can save a dictionary in python(obviously) so that the script is rerun it automatically loads the dictionary. -- https://mail.python.org/mailman/listinfo/python-list