comp.lang.python u see website get some doller

2008-10-11 Thread kavitha
www.artsandscience4.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

writing dictionaries to a file

2007-03-21 Thread kavitha thankaian
#x27;excellent', 'code':'ccc'} now i would like to write this to a file in the following format(unit, code),,,the output should be as follows written to a file,,, 00, aaa 00, bbb 00, ccc can someone help me? Rega

Re: writing dictionary to file

2007-03-08 Thread kavitha thankaian
;) f.writelines("%s" %some['name']) f.writelines("credit:") f.writelines("%s" % amount) but i see an empty file opened,,, kavitha Simon Brunning <[EMAIL PROTECTED]> wrote: On 3/8/07, kavitha thankaian wrote

writing dictionary to file

2007-03-08 Thread kavitha thankaian
,'name':zzz} some={'DorC':'C', 'amount':900,'name':zzz} and so on,,, if the credit and debit is not equal for a person, then i would like to open a file and write it in the following format: name:yyy debit:300 credit:500 name:zzz debit:700 credit:900 can anyone help me??? kavitha - Here’s a new way to find what you're looking for - Yahoo! Answers -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question(file-delete trailing comma)

2007-03-01 Thread kavitha thankaian
thanks,,, i tried another way and it works,,, f.writelines(','.join([('\"%s\"' % some[field]) for field in field_order])) thanks a lot,,, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Wed, 28 Feb 2007 08:34:29 -0300, kavitha thankaian

Re: newbie question(file-delete trailing comma)

2007-02-28 Thread kavitha thankaian
writelines('\"%s\",' % someprt[field] ) do you have an idea now how should it look like??? Mikael Olofsson <[EMAIL PROTECTED]> wrote: kavitha thankaian wrote: > my script writes a dictionary to a file.but i need only the values > from the

Re: newbie question(file-delete trailing comma)

2007-02-28 Thread kavitha thankaian
Thanks Sanket,,, But still doesnt solve my problem,,, now my file contains: aa,ba,b,ca,b,c, and so on,,, the comma at the end is deleted,,,but the file contains some junk values,,, kavitha sanket kathalkar <[EMAIL PROTECTED]> wrote: Solution to this prob

Re: newbie question(file-delete trailing comma)

2007-02-28 Thread kavitha thankaian
telines('\%s\,' % value )>strings seperated by comma when i execute the above code,my test.txt file has the following: a,b,c,d, now i need to delete the comma at the end,,,this is my problem,,, kavitha Mikael Olofsson <[EMAIL PROTECTED]

Re: newbie question(file-delete trailing comma)

2007-02-27 Thread kavitha thankaian
i run the above code,i get an error"bad file descriptor" thanks,, kavitha Mohammad Tayseer <[EMAIL PROTECTED]> wrote: kavitha thankaian <[EMAIL PROTECTED]> wrote: > and i need the output also in the same input.txt jus

Re: newbie question(file-delete trailing comma)

2007-02-26 Thread kavitha thankaian
?? kavitha Mohammad Tayseer <[EMAIL PROTECTED]> wrote: ok, it should be -- import sys in_file = open(sys.argv[1]) out_file = open(sys.argv[2], 'w') for line in in_file: print >> out_file, line.strip().strip(',') -- strip(',') w

newbie question(file-delete trailing comma)

2007-02-26 Thread kavitha thankaian
hi, i have a file which has the contents as follows: a,b,c,d, a1,b1,c1,d1, a2,b2,c2,d2, i would like to delete all the trailing commas,, if someoneknows pls help me,, kavitha - Here’s a new way to

Re: writing a file:newbie question

2007-02-26 Thread kavitha thankaian
a,b,c,d, i would like to delete the trailing comma at the end,,, if someone knows pls write to me,,, kavitha Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Mon, 19 Feb 2007 08:02:29 -0300, kavitha thankaian escribió: > Hi, > i have a file test.txt and it contai

writing a file:newbie question

2007-02-19 Thread kavitha thankaian
as "a","b","c","d" "a1","b1","c1","d1 "a2","b2","c2","d2" and would like to delete the comma at the end. if soneone knows pls help me,,, kavitha - Here’s a new way to find what you're looking for - Yahoo! Answers -- http://mail.python.org/mailman/listinfo/python-list

list of strings-newline

2007-02-15 Thread kavitha thankaian
Hi i have a list as follows list="a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3, I would like to print as a1,b1,c1,d1, a2,b2,c2,d2, a3,b3,c3,d3, and then i would like to delete the comma at the end,,say like,, a1,b1,c1,d1 a2,b2,c2,d2 a3,b3,c3,d3 (its always

Re: newbie question:connecting to a database

2007-01-25 Thread kavitha thankaian
,,, Kavitha Eugene Antimirov <[EMAIL PROTECTED]> wrote: kavitha thankaian wrote: > Hi, > > i wrote a simple script (which follows) to insert a table in the > database.i could execute this query and get the result in python > shell.but when i open "my sql enterprise m

Re: newbie question

2007-01-23 Thread kavitha thankaian
: mxODBC.ProgrammingError: ('S0002', 208, "[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name customer.", 4612) If someone knows the solution please help me,,, Kavitha Eugene Antimirov <[EMAIL PROTECTED]> wrote: Eugene Antimirov wrote

newbie question

2007-01-22 Thread kavitha thankaian
te("insert into animals values('goat','lamb')") cursor.execute("select * from animals") print cursor.fetchall() Rgds Kavitha - Here’s a new way to find what you're looking for - Yahoo! Answers -- http://mail.python.org/mailman/listinfo/python-list