Re: How can i use Spread Sheet as Data Store
Thanks Alex Then tell me how can I solve this issue. Thanks in advance Regards Kalyan On Wed, May 20, 2009 at 8:11 AM, alex23 wrote: > On May 19, 11:57 pm, "D'Arcy J.M. Cain" wrote: > > I hear you but I'm not so sure that that is an absolute. There are > > many applications that allow you to have your password emailed to you. > > For something with low risk that's perfectly acceptable. > > Having -any- password stored in plaintext is unacceptable. I'm pretty > sure I'm not the only person who uses a simple algorithm to generate > passwords based on context. If you're running a site and you're not > going to bother to secure my credentials, I'd hope you'd at least > mention that at sign up so I could adjust my behaviour as appropriate. > -- > http://mail.python.org/mailman/listinfo/python-list > -- Regards Kalyan Mobile no: +91 9985351220 -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
On May 19, 11:57 pm, "D'Arcy J.M. Cain" wrote: > I hear you but I'm not so sure that that is an absolute. There are > many applications that allow you to have your password emailed to you. > For something with low risk that's perfectly acceptable. Having -any- password stored in plaintext is unacceptable. I'm pretty sure I'm not the only person who uses a simple algorithm to generate passwords based on context. If you're running a site and you're not going to bother to secure my credentials, I'd hope you'd at least mention that at sign up so I could adjust my behaviour as appropriate. -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
On Tue, 19 May 2009 09:50:18 -0400 Terry Reedy wrote: > D'Arcy J.M. Cain wrote: > > I can't answer your question about reading Google spreadsheets but I do > > wonder why you are trying to solve a database problem with a > > Hardly even a database problem. OP only needs a dict mapping username > to passwd. Of course, that could grow... s/could/will/ > An issue not touched on is that passwords should *not* be kept in > plaintext form. Hence the data store should be written by program and I hear you but I'm not so sure that that is an absolute. There are many applications that allow you to have your password emailed to you. For something with low risk that's perfectly acceptable. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
D'Arcy J.M. Cain wrote: On Tue, 19 May 2009 10:51:57 +0530 Kalyan Chakravarthy wrote: Actually my requirement is in an web application when user enters User name and Password, back end i needs to check, is it they entered correct user name with password ( here i want to read the Spread Sheet Data in Python code ), for this i will keep all the user names and passwords in Google Spread Sheet I can't answer your question about reading Google spreadsheets but I do wonder why you are trying to solve a database problem with a spreadsheet in the first place, especially with all the support Python has for database access. Hardly even a database problem. OP only needs a dict mapping username to passwd. Of course, that could grow... An issue not touched on is that passwords should *not* be kept in plaintext form. Hence the data store should be written by program and not hand-edited. With a small dict kept in memory, a pickle might work fine. tjr -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
On Tue, 19 May 2009 10:51:57 +0530 Kalyan Chakravarthy wrote: > Actually my requirement is > in an web application when user enters User name and Password, > back end i needs to check, is it they entered correct user name with > password ( here i want to read the Spread Sheet Data in Python code ), > for this i will keep all the user names and passwords in Google Spread Sheet I can't answer your question about reading Google spreadsheets but I do wonder why you are trying to solve a database problem with a spreadsheet in the first place, especially with all the support Python has for database access. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
Hi John I am using Google Spread Sheet with 20 rows of data , OS is Windows XP Python2.6 Actually my requirement is in an web application when user enters User name and Password, back end i needs to check, is it they entered correct user name with password ( here i want to read the Spread Sheet Data in Python code ), for this i will keep all the user names and passwords in Google Spread Sheet now tell me how can i read Spread Sheet data in Python Reply me Regards Kalyan On Mon, May 18, 2009 at 8:56 PM, John Machin wrote: > Kalyan Chakravarthy hyit.com> writes: > > > > > Hi All, I have data in Spread Sheet ( First Name and Last > Name), > how can i see this data in Python code ( how can i use Spread Sheet as > Data > Store ) . -- RegardsKalyan > > Hi Kalyan, > > A few questions ... the answers might help us help you better: > > What type of spreadsheet do you have: > .ods (produced by OpenOffice.org's calc)? > .gnumeric? > .xls (MS Excel 2003)? > .xlsx (MS Excel 2007)? > something else? > > Do you want to update the spreadsheet using Python, or will that be done > manually? How many rows of data are you likely to have? > > What version of Python do you plan to use? > > What OS are you using? > > Cheers, > John > > > > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Regards Kalyan Mobile no: +91 9985351220 -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
On May 18, 11:45 pm, Wincent wrote: > If you want to write to a csv file, the other option is savetxt in > NumPy module. > > Best > > On May 19, 7:29 am, John Machin wrote: > > > On May 19, 5:12 am, Terry Reedy wrote: > > > > Kalyan Chakravarthy wrote: > > > > Hi All, > > > > I have data in Spread Sheet ( First Name and Last Name), > > > > how can i see this data in Python code ( how can i use Spread Sheet as > > > > Data Store ) . > > > > I you have a choice, a plain text file is MUCH easier. > > > for line in open('guff.txt'): > > first, last = line.rstrip('\n').split('\t') > > > > Or, you can output a plain text data.csv (comma-separated variable) file > > > from the spreadsheet and read that with the csv module. > > > import csv > > for row in csv.reader(open('guff.csv', 'rb')): > > first, last = row > > > Or, if you have an Excel XLS file, use xlrd: > > > import xlrd > > book = xlrd.open_workbook('guff.xls') > > sheet = book.sheet_by_index(0) > > for rowx in xrange(sheet.nrows): > > first, last = sheet.row_values(rowx) > > > So far I don't see "MUCH" easier ... than what? Perhaps much easier > > than using odfpy, which states right up front """Odfpy aims to be a > > complete API for OpenDocument in Python. Unlike other more convenient > > APIs, this one is essentially an abstraction layer just above the XML > > format.""" Perhaps much easier than using COM? I didn't see it mentioned yet, but the Google Spreadsheet application is also something you could use if you have a choice. It has a fairly useful API that let's you manage elements. I'm not sure if it's an option for you or not. http://code.google.com/apis/spreadsheets/overview.html Thanks, Jeff mcjeff.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
If you want to write to a csv file, the other option is savetxt in NumPy module. Best On May 19, 7:29 am, John Machin wrote: > On May 19, 5:12 am, Terry Reedy wrote: > > > Kalyan Chakravarthy wrote: > > > Hi All, > > > I have data in Spread Sheet ( First Name and Last Name), > > > how can i see this data in Python code ( how can i use Spread Sheet as > > > Data Store ) . > > > I you have a choice, a plain text file is MUCH easier. > > for line in open('guff.txt'): > first, last = line.rstrip('\n').split('\t') > > > Or, you can output a plain text data.csv (comma-separated variable) file > > from the spreadsheet and read that with the csv module. > > import csv > for row in csv.reader(open('guff.csv', 'rb')): > first, last = row > > Or, if you have an Excel XLS file, use xlrd: > > import xlrd > book = xlrd.open_workbook('guff.xls') > sheet = book.sheet_by_index(0) > for rowx in xrange(sheet.nrows): > first, last = sheet.row_values(rowx) > > So far I don't see "MUCH" easier ... than what? Perhaps much easier > than using odfpy, which states right up front """Odfpy aims to be a > complete API for OpenDocument in Python. Unlike other more convenient > APIs, this one is essentially an abstraction layer just above the XML > format.""" Perhaps much easier than using COM? -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
On May 19, 5:12 am, Terry Reedy wrote: > Kalyan Chakravarthy wrote: > > Hi All, > > I have data in Spread Sheet ( First Name and Last Name), > > how can i see this data in Python code ( how can i use Spread Sheet as > > Data Store ) . > > I you have a choice, a plain text file is MUCH easier. for line in open('guff.txt'): first, last = line.rstrip('\n').split('\t') > Or, you can output a plain text data.csv (comma-separated variable) file > from the spreadsheet and read that with the csv module. import csv for row in csv.reader(open('guff.csv', 'rb')): first, last = row Or, if you have an Excel XLS file, use xlrd: import xlrd book = xlrd.open_workbook('guff.xls') sheet = book.sheet_by_index(0) for rowx in xrange(sheet.nrows): first, last = sheet.row_values(rowx) So far I don't see "MUCH" easier ... than what? Perhaps much easier than using odfpy, which states right up front """Odfpy aims to be a complete API for OpenDocument in Python. Unlike other more convenient APIs, this one is essentially an abstraction layer just above the XML format.""" Perhaps much easier than using COM? -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
Kalyan Chakravarthy wrote: Hi All, I have data in Spread Sheet ( First Name and Last Name), how can i see this data in Python code ( how can i use Spread Sheet as Data Store ) . I you have a choice, a plain text file is MUCH easier. Or, you can output a plain text data.csv (comma-separated variable) file from the spreadsheet and read that with the csv module. -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
Kalyan Chakravarthy hyit.com> writes: > > Hi All, I have data in Spread Sheet ( First Name and Last Name), how can i see this data in Python code ( how can i use Spread Sheet as Data Store ) . -- RegardsKalyan Hi Kalyan, A few questions ... the answers might help us help you better: What type of spreadsheet do you have: .ods (produced by OpenOffice.org's calc)? .gnumeric? .xls (MS Excel 2003)? .xlsx (MS Excel 2007)? something else? Do you want to update the spreadsheet using Python, or will that be done manually? How many rows of data are you likely to have? What version of Python do you plan to use? What OS are you using? Cheers, John -- http://mail.python.org/mailman/listinfo/python-list
Re: How can i use Spread Sheet as Data Store
Hi Kaliyan, It is very simple. There is a library called odfpy which you can use to read and write odf documents. I highly recommend using open formats so that the API is clear and you can ask help if needed. The odfpy library has modules to create spreadsheets and read or write by row or sell etc. happy hacking. Krishnakant. On Mon, 2009-05-18 at 16:31 +0530, Kalyan Chakravarthy wrote: > Hi All, > I have data in Spread Sheet ( First Name and Last Name), > how can i see this data in Python code ( how can i use Spread Sheet > as Data Store ) . > > -- > Regards > Kalyan > -- http://mail.python.org/mailman/listinfo/python-list