seeming limit on number of shelve records? Programming Software Development by tomoconnell …name name = getattr(testrecord, 'name') import shelve db = shelve.open('eride') db[name] = testrecord db.close…cnt +1 def listtest(self): import shelve db = shelve.open(testfile) test = raw_input("test… Re: seeming limit on number of shelve records? Programming Software Development by tomoconnell …name name = getattr(testrecord, 'name') import shelve db = shelve.open(testfile) db[name] = testrecord def …close() def listtest(self): import shelve db = shelve.open(testfile) cnt = 1 while… Re: seeming limit on number of shelve records? Programming Software Development by tomoconnell …, thanks to the kickbutt moderator. I tried to break his shelve code the same way mine broke, but could not. Went… the two, and my error was that I open the shelve in a routine to look at the key, to know… record, in in this save routine I RE-open the shelve.. THIS is what messes stuff up. When i move the… Re: I am trying to get values from a shelve db but it keeps failing Programming Software Development by SamarthWiz …quot;, filetypes = ["*.dat"] ) try: db = shelve.open(file, writeback=True) Items = db.values() self.components…;, filetypes = ["*.dat"] ) try: db = shelve.open(file, writeback=True) Items = db.values() self.components… Re: Persistent to file dictionary using Python module shelve Programming Software Development by Gribouillis ….python.org/pypi/ZODB) instead of [shelve](http://docs.python.org/3/library/shelve.html#module-shelve). ''' zodb_test.py Use third party module… I am trying to get values from a shelve db but it keeps failing Programming Software Development by SamarthWiz Hi I am trying open a record from a shelve db I Know that it stops working at `copy = db[… Re: I am trying to get values from a shelve db but it keeps failing Programming Software Development by Gribouillis If it stops working, there must be a traceback or something. Can you post the traceback ? Also your code doesn't show what is db nor its content, perhaps you could attach the shelve file in a zipped form. The 'global db' statements are suspicious. At best, they serve no purpose. Persistent to file dictionary using Python module shelve Programming Software Development by vegaseat The code shows you how to create a persistent to file dictionary of data using the python module shelve. Re: Newbie- Need Assistance Programming Software Development by olufunkky …'): self.dbname = dbname; self.shelve = shelve.open(self.dbname); def __del__(self): self.shelve.close() self.shelve = None def add(self, name…self, string): list = [] for key in self.shelve.keys(): e = self.shelve[key] if cmp(e, string) == 0: … Newbie- Need Assistance Programming Software Development by olufunkky …'): self.dbname = dbname; self.shelve = shelve.open(self.dbname); def __del__(self): self.shelve.close() self.shelve = None def add(self, name…self, string): list = [] for key in self.shelve.keys(): e = self.shelve[key] if cmp(e, string) == 0: … Need help enhancing a program Programming Software Development by biganimal ….dbname = dbname; self.shelve = shelve.open(self.dbname); def __del__(self): self.shelve.close() self.shelve = None def add(self…type = HOME): e = phoneentry(name, number, type) self.shelve[str(e)] = e def lookup(self, string): list =… [] for key in self.shelve.keys(): e = self.shelve[key] if cmp(e, string) == … Re: Need help enhancing a program Programming Software Development by bumsfeld … self.dbname = dbname; self.shelve = shelve.open(self.dbname); def __del__(self): self.shelve.close() self.shelve = None def add(self, …self, string): list = [] for key in self.shelve.keys(): e = self.shelve[key] if cmp(e, string) == 0: … Re: Newbie- Need Assistance Programming Software Development by olufunkky …'): self.dbname = dbname; self.shelve = shelve.open(self.dbname); def __del__(self): self.shelve.close() self.shelve = None def add(self, name…self, string): list = [] for key in self.shelve.keys(): e = self.shelve[key] if cmp(e, string) == 0: … Help with delete contact in a db Programming Software Development by jeremywduncan … = dbname; self.shelve = shelve.open(self.dbname); def __del__(self): self.shelve.close() self.shelve = None def add…list = [] for key in self.shelve.keys(): e = self.shelve[key] if cmp(e, string) … Please help me to make a phonebook with Python Programming Software Development by darma001 …). Add persistence to the phonebook program by using module shelve. “Persistence” means that data is retained also when …the program stops executing. Objects created by opening a “shelve” behave largely like dictionaries. So we may replace the… dictionary by a “shelve”, and the functions that alter the phonebook should still… Re: Help with delete contact in a db Programming Software Development by woooee … an error on the first test lookup at e = self.shelve[key] because the keys are not correct. If it works… to how he adds data to a shelve object. Deleting is just del self.shelve[key], but you also have to set… Re: Help with delete contact in a db Programming Software Development by woooee You have to set writeback=True for changes to be made to the db. Doug Hellmann has a nice write up [Click Here](http://doughellmann.com/2007/08/pymotw-shelve.html) Re: Please help me to make a phonebook with Python Programming Software Development by griswolf … the default? [/LIST] edit: I see there is something called 'shelve' that will handle my last two points. OK. If you… how do you iterate though a file on a shelf? Programming Software Development by tomoconnell … very strange results from the following: def list(self) import shelve db = shelve.open(testfile) list = [] cnt = 0 for id in db… walk through a variable length list, that you stored via shelve? Re: how do you iterate though a file on a shelf? Programming Software Development by vegaseat I am not sure if you are working correctly with the module shelve. For an example see Starting Python post: [url]http://www.daniweb.com/forums/post490861-110.html[/url] Remember shelve behaves like a 'persistent to file' dictionary. Python Help..... Please? Programming Software Development by Fearx351 …are below. [code] def high_Priority(): ## print'' import shelve high_space = 3000 file_sizeh = file_size * week_selec h_back = high_space - …file_sizeh db = shelve.open("netback.dat") db['hremspace'] = h_back db… Re: Python Help..... Please? Programming Software Development by Beat_Slayer … the context but... [CODE]def high_Priority(): ## print'' import shelve file_sizeh = file_size * week_selec db = shelve.open("netback.dat") db['hremspace'] = h_back… Re: keys problem Programming Software Development by jrcagle …;Python"] >>> import shelve ## set up an example >>> f= shelve.open("mydatabase") >>… Re: Python Help..... Please? Programming Software Development by Fearx351 … to work. [code] file_sizeh = file_size * week_selec h_back = high_space - file_sizeh db = shelve.open('netback.dat') db['hremspace'] = h_back db['netback'] = back_name db… need help with pickling please Programming Software Development by whoru …'s the code I have so far: [code] import cPickle, shelve player_score=[name, score] high_scores=open("high_scores.dat", "… Re: need help with pickling please Programming Software Development by vegaseat Looks to me like you have to append more names and scores to your player_score list before you use cPickle. The module cPickle just dumps and loads complete objects, it does not append the present object file. There is no need to import shelve, since you are not using it. Re: need help with pickling please Programming Software Development by whoru … the present object file. There is no need to import shelve, since you are not using it.[/quote] I was able… Mailing List Scripts Programming Web Development by zippee Hi there, I am trying to integrate a simple mailing list/newsletter script (in php) to my site, which will be share by my clients (to their customers). Is there any off the shelve and free one available? I knw I may find it from hotscripts.com, but would appreciate any good recommendations. keys problem Programming Software Development by eibwen … point me in the right direction please? I have a shelve object- book. If I do book.keys(), naturally I get… MySQLdb interface problem Programming Databases by bhanu1225 …_sqlite3 grp sgmllib DocXMLRPCServer _sre gzip sha EasyDialogs _ssl hashlib shelve Explorer _strptime heapq shlex FileDialog _struct hmac shutil Finder _symtable…