On Oct 16, 5:05 pm, John Townsend <[EMAIL PROTECTED]> wrote:
> Joe had a good point! Let me describe what problem I'm trying to solve and
> the list can recommend some suggestions.
>
> I have two text files. Each file contains data like this:
>
> Test file 1234 4567 8975
>
> I want to compare the
MRAB:
> for line in open(path):
> fields = line.split("\t")
> data[tuple(fields[ : 2])] = fields[2 : ]
Keeping the key as a string may have some memory/performance
advantages (not tested):
for line in open(path):
fields = line.split("\t")
data[fields[0] + fields[1]] = map(float, i
On Oct 16, 11:03 pm, John Townsend <[EMAIL PROTECTED]> wrote:
> Here are some sample lines.
>
> Text file 1 contains:
>
> DescribeImage AllAdjustments.psd 0.66812636 0.046 0.426
> 0.06475 0.06475 0.005875
> DescribeImage All_Options_Multi.psd 0.552750021219 0.046 0.355875
; DescribeImage
Apple_RGB.psd"), skip the comparison test.
I hope this helps describe my problem.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Lee Bieber
Sent: Thursday, October 16, 2008 2:44 PM
To: python-list@python.org
Subject: Re: Dictionary o
anyone has a better idea, I'd love to hear it.
-Original Message-
From: Joe Strout [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2008 1:49 PM
To: John Townsend
Subject: Re: Dictionary of Dicts question
On Oct 16, 2008, at 1:19 PM, John Townsend wrote:
> Accessing value
I believe that
myDict['TestName'] = {'NewFileName': {}, }
should be
myDict['TestName']['NewFileName'] = {}
-Bill
On Thu, Oct 16, 2008 at 3:44 PM, Chris Rebert <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 16, 2008 at 12:19 PM, John Townsend <[EMAIL PROTECTED]>
> wrote:
> > I'm working with a Dictiona
On Thu, Oct 16, 2008 at 12:19 PM, John Townsend <[EMAIL PROTECTED]> wrote:
> I'm working with a Dictionary of Dicts. Something like this:
>
> myDict = {
> 'TestName': {
> 'FileName':{
>
>
I'm working with a Dictionary of Dicts. Something like this:
myDict = {
'TestName': {
'FileName':{
'ct_in