Re: Data storing

2016-02-02 Thread Joel Goldstick
On Tue, Feb 2, 2016 at 5:33 AM, Steven D'Aprano wrote: > On Tue, 2 Feb 2016 01:19 pm, Anup reni wrote: > > > Hi I'm new to python and planning to make a web app which contains a > large > > amount of data and involves comparing two data sets. Which is better to > > use in python, a Dictionary or

Re: Data storing

2016-02-02 Thread Steven D'Aprano
On Tue, 2 Feb 2016 01:19 pm, Anup reni wrote: > Hi I'm new to python and planning to make a web app which contains a large > amount of data and involves comparing two data sets. Which is better to > use in python, a Dictionary or Mysql? "Hi, I'm planning to transport a large number of objects fro

Re: Data storing

2016-02-02 Thread dieter
Anup reni writes: > Hi I'm new to python and planning to make a web app which contains a large > amount of data and involves comparing two data sets. Which is better to use > in python, a Dictionary or Mysql? Is it important for your data to be persistent (i.e. live across restarts of your web a

Data storing

2016-02-02 Thread Anup reni
Hi I'm new to python and planning to make a web app which contains a large amount of data and involves comparing two data sets. Which is better to use in python, a Dictionary or Mysql? -- https://mail.python.org/mailman/listinfo/python-list

Re: Parsing Data, Storing into an array, Infinite Backslashes

2005-07-13 Thread [EMAIL PROTECTED]
I ended up using this code to solve my problem. > for a, b, c, d in s: > if not query.has_key((a,b)): query[(a,b)] = [] >query[(a,b)].append("%s=%s" % (c, d)) > for (a,b), v in query.items(): >print a, b, ", ".join(v) I'm relatively new to python/programming in general. I usually writ

Re: Parsing Data, Storing into an array, Infinite Backslashes

2005-07-12 Thread [EMAIL PROTECTED]
Thanks for all the help, I'm not sure what approach I'm going to try but I think I'll try all of your suggestions and see which one fits best. The variable "i" held the following array: [['Memory', '0', 'Summary', '0'], ['Memory', '0', 'Speed', 'PC3200U-30330'], ['Memory', '0', 'Type', 'DDR SDRAM

Re: Parsing Data, Storing into an array, Infinite Backslashes

2005-07-11 Thread Steven D'Aprano
On Mon, 11 Jul 2005 13:47:22 -0700, [EMAIL PROTECTED] wrote: > I am using this function to parse data I have stored in an array. > > This is what the array looks like: > > [['Memory', '0', 'Summary', '0'], ['Memory', '0', 'Speed', > 'PC3200U-30330'], ['Memory', '0', 'Type', 'DDR SDRAM'], ... ]

Re: Parsing Data, Storing into an array, Infinite Backslashes

2005-07-11 Thread Jeff Epler
Your code is needlessly complicated. Instead of this business while 1: try: i = fetch.next() except stopIteration: break simply write: for i in fetch: (if there's an explicit 'fetch = iter(somethingelse)' in code you did not show, then get rid of tha

Parsing Data, Storing into an array, Infinite Backslashes

2005-07-11 Thread [EMAIL PROTECTED]
I am using this function to parse data I have stored in an array. This is what the array looks like: [['Memory', '0', 'Summary', '0'], ['Memory', '0', 'Speed', 'PC3200U-30330'], ['Memory', '0', 'Type', 'DDR SDRAM'], ['Memory', '0', 'Size', '512'], ['Memory', '0', 'Slot', 'DIMM0/J11'], ['Memory',