Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subsequent': 0.05; 'that?': 0.05; 'tree': 0.05; 'assignment': 0.07; 'subject:code': 0.07; 'kumar': 0.09; 'linear': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.12; '(it': 0.16; '(something': 0.16; 'example)': 0.16; 'files)': 0.16; 'keys)': 0.16; 'message- id:@4ax.com': 0.16; 'nodes.': 0.16; 'of)': 0.16; 'pairs,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:post': 0.16; 'tends': 0.16; 'usage,': 0.16; 'code.': 0.18; 'wed,': 0.18; 'trying': 0.19; 'shape': 0.19; 'input': 0.22; '(in': 0.22; 'creating': 0.23; 'example.': 0.24; 'precise': 0.24; 'url:home': 0.24; 'looks': 0.24; 'question': 0.24; 'sort': 0.25; 'least': 0.26; 'skip:" 20': 0.27; 'header:X-Complaints-To:1': 0.27; 'record': 0.27; "doesn't": 0.30; 'sets': 0.30; 'code': 0.31; 'description,': 0.31; 'restricted': 0.31; 'sets.': 0.31; 'file': 0.32; 'device': 0.34; '"the': 0.34; 'maybe': 0.34; 'skip:d 20': 0.34; "can't": 0.35; 'something': 0.35; 'test': 0.35; 'but': 0.35; 'really': 0.36; 'data,': 0.36; 'charset:us-ascii': 0.36; 'similar': 0.36; 'should': 0.36; 'application': 0.37; 'list': 0.37; 'received:76': 0.38; 'to:addr:python-list': 0.38; 'previous': 0.38; 'itself': 0.39; 'structure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'subject:Can': 0.60; 'devices': 0.61; 'new': 0.61; 'simple': 0.61; 'save': 0.62; 'refer': 0.63; 'more': 0.64; 'linked': 0.65; 'here': 0.66; 'between': 0.67; 'overall': 0.69; 'helping': 0.70; 'records': 0.73; 'difficult,': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Can post a code but afraid of plagiarism Date: Wed, 22 Jan 2014 08:53:37 -0500 Organization: IISS Elusive Unicorn References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-249-23-236.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390398823 news.xs4all.nl 2974 [2001:888:2000:d::a6]:57298 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64498 On Wed, 22 Jan 2014 00:36:17 -0800 (PST), indar kumar declaimed the following: >So my question is if I am giving multiple inputs(a new device say for example) in a loop and creating a database(dictionary) for each new devices for example. I want subsequent devices to save their data(values only not keys) to the database of each of the already existing devices. How can I do that? Any hint?I have been stuck here for 3 days. It would really help to see samples of what you input looks like (it doesn't have to match your assignment test data, but should be something similar in shape and usage), and what you visualize the end result should look like. And you linking of "database" to "dictionary" is not helping -- not when you then state "the database of each of"... "database", in the least precise usage, tends to refer to the overall collection of persisted (something in files) data used by an application (under this usage, an .INI file is a "database" of configuration data). In the more restricted usage, a database is a collection of (multiple sets of) similar records of data accessed by some sort of key, with linkages between sets. I can't tell, from your description, if you are using "database(dictionary)" in terms of a simple BDB structure (unique key : data /record/), where each record would be one of your "devices", or if you mean that the record itself is a dictionary structure with (fieldID : value) pairs, and you want to create a linear list of these items (in which case you have to search the whole list to find a particular record), or maybe a dictionary of dictionaries... Or maybe you are trying to create a tree in which subsequent "devices" are linked to various previous device nodes. Code for any of those forms is not overly difficult, but one must lock down the data structures before creating the code. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/