On Thursday 08 March 2007 14:40, kavitha thankaian
wrote:
> Hi Simon,
>
> iam till here:
>
> dorc=some['DorC']
> amount=some['amount']
> f=open("logfile.txt", "w")
> if dorc =='C':
>a = -(amount)
> if dorc == 'D':
>b = amount
>sum=a + b
>if sum == 0:
>f.writelines
Hi Simon,
iam till here:
dorc=some['DorC']
amount=some['amount']
f=open("logfile.txt", "w")
if dorc =='C':
a = -(amount)
if dorc == 'D':
b = amount
sum=a + b
if sum == 0:
f.writelines("name:")
f.writelines("%s" %some['name'])
f.writelines("credit:"
Hi,
I have 'n' number of dictionaries with the same name but different values
( DorC means debit or credit)
some={'DorC':'D', 'amount':200,'name':'xxx'}
some={'DorC':'C', 'amount':200,'name':'xxx'}
some={'DorC':'D', 'amount':300,'name':'yyy'}
some={'DorC':'C', 'amount':500,
You don't define what you mean by "a lot". Python can read
a tremendous amount of information from files in a very short
amount of time so I wouldn't try to prematurely optimize this.
Just read the information and see how long it takes. If it
is really a long time, then look for alternatives. It
Enrique Palomo Jiménez wrote:
> Hi all,
>
> I'm writing an application who needs to handle a lot of information of
> several files.
> So, i think the better way is design a batch process to catch that
> information in a dictionary and write it in a file.
> So, after that when a user wants to ret
Hi all,
I'm writing an application who needs to handle a lot of information of several
files.
So, i think the better way is design a batch process to catch that information
in a dictionary and write it in a file.
So, after that when a user wants to retrieve something, only with an execfile
i'll