Re: [True] results 'b' But how?

2007-07-05 Thread kath
Hi Kelvie and RBH, Thanks for your quick reply. That was very much helpful indeed. regards, kath. -- http://mail.python.org/mailman/listinfo/python-list

['a', 'b'][True] results 'b' But how?

2007-07-04 Thread kath
] 'a' >>> ['a','b']['some_string' == r'some_string'] 'b' >>> ['a','b']['some_string' == r'somestring'] 'a' Thanks in advance, regards, kath. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to build a forum in Python?

2007-04-04 Thread kath
not > everything has to be in python. thanks you all, for your reply. I want to do for my corporate environment. I had two option one is Python and other is Perl. I came to know Django is Python framework, so chose Python. Not only that I would like to code in Python. Thanks again, kath. -

how to build a forum in Python?

2007-04-04 Thread kath
about this but ended up in getting tuts for building website in PHP. I would like to know some useful links to learn or some usefull guidelines to build my fourm in Python. Also is any forums which are built using Python? I would appreciate your help, Thanks in advance, kath. -- http

how to build a forum?

2007-04-04 Thread kath
about this but ended up in getting tuts for building website. I would like to know some useful links to learn or some usefull guidelines. I would appreciate your help, Thanks in advance, kath. -- http://mail.python.org/mailman/listinfo/python-list

A question on Encoding and Decoding.

2006-11-13 Thread kath
hat encoding I should use, and after wring to file I should the same special character. Also python IDLE is able to output the same character corretly when I say print and why not I? Any suggestions would be greatly appreciated. thanks. regards, kath. -- http://mail.python.org/mailman/listinfo/python-list

Re: how do I pass values between classes?

2006-11-05 Thread kath
hi, Larry Bates thanks for the reply... > You might consider doing it the same way wx passes things around. > When you instantiate the subclass pass the parent class' instance > as first argument to __init__ method. Yes thats absolutely right.. > That way the subclass can > easily pass valu

how do I pass values between classes?

2006-11-03 Thread kath
: frame=wx.Frame(None, -1, "Child window") panel=Child(frame, -1) frame.Show(True) self.SetTopWindow(frame) return True if __name__ == '__main__': app=MyApp() app.MainLoop() [/code] thank you, regards, kath. -- http://mail.python.org/mailman/listinfo/python-list

Serious wxPython Error while executing..

2006-10-30 Thread kath
(self.p2) #print "notebook created" addPage=_AddNewFund(nb) nb.AddPage(addPage, "Add new Fund") #print "page got added" sizer=wx.BoxSizer() sizer.Add(nb, 1, wx.EXPAND) self.p2.SetSizer(sizer) #print "end

what are XLRDError and CompDocError?

2006-10-17 Thread kath
Hi, i am facing some problems with opening an excel file. I am using XLRD module. I am getting XLRDError: Can't find workbook in OLE2 compound document and CompDocError: Not a whole number of sectors exceptions in seperate try on different files. 1.Does any one know anout these exceptions? wha

XLRDError: Can't find workbook in OLE2 compound document

2006-10-16 Thread kath
Hi XLRDError: Can't find workbook in OLE2 compound document What does this error means? When I try to open some excel files using XLRD, I encounter this error. Not with every excel, but with some file. Can anybody help me know, what is this error trying say and what I should do to avoid this

Re: what is this UnicodeDecodeError:....?

2006-10-11 Thread kath
John Machin wrote: > kath wrote: > > I have a number of excel files. In each file DATE is represented by > > different name. I want to read the date from those different file. Also > > the date is in different column in different file. > > > > To identify the dat

Re: Is a list static when it's a class member?

2006-10-10 Thread kath
glue wrote: > I have a class with a list member and the list seems to behave like > it's static while other class members don't. The code... > > class A: > name = "" > data = [] > def __init__(self, name): > self.name = name > def append(self, info): > self.data.appe

what is this UnicodeDecodeError:....?

2006-10-10 Thread kath
I have a number of excel files. In each file DATE is represented by different name. I want to read the date from those different file. Also the date is in different column in different file. To identify the date field in different files I have created a file called _globals where I keep all aliase

TypeError: unsupported type for timedelta days component: unicode

2006-10-06 Thread kath
Hi, the following shows the contents of "datebook.xls" Date 8/9/2006 8/9/2006 8/9/2006 8/9/2006 8/9/2006 # read_date.py import xlrd book = xlrd.open_workbook("datebook.xls") sh = book.sheet_by_index(0) ex_qdate=sh.cell_value(rowx=1,colx=0) pyd=datetime.date(1900,1,1)+datetime.timedelta(days=sh.

Re: how to convert UNICODE to integer in Python?

2006-10-06 Thread kath
Fredrik Lundh wrote: > kath wrote: > > > xldays = int(xldate) > > ValueError: invalid literal for int(): Date > > > > because xlrd.xldate_as_tuple() function expects first argument to be an > > integer. How do I convert an unicode character to integer, so

how to convert UNICODE to integer in Python?

2006-10-06 Thread kath
_tuple xldays = int(xldate) ValueError: invalid literal for int(): Date because xlrd.xldate_as_tuple() function expects first argument to be an integer. How do I convert an unicode character to integer, so that I could get the date using xlrd.xldate_as_tuple() function. Thank you, kath. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I read Excel file in Python?

2006-10-06 Thread kath
John Machin wrote: > [EMAIL PROTECTED] wrote: > > > > >>> excel_date = 38938.0 > > > > >>> python_date = datetime.date(1900, 1, 1) + > > > > >>> datetime.timedelta(days=excel_date) > > > > >>> python_date > > > > datetime.date(2006, 8, 11) > > > > > > Err, that's the wrong answer, isn't it? Perhap

Re: How do I read Excel file in Python?

2006-10-05 Thread kath
John Machin wrote: > kath wrote: > > How do I read an Excel file in Python? > > > > I have found a package to read excel file, which can be used on any > > platform. > > Hi Sudhir, > So far, so good :-) > > > > > http://www.lexicon.net/sjmachin/x

How do I read Excel file in Python?

2006-10-05 Thread kath
How do I read an Excel file in Python? I have found a package to read excel file, which can be used on any platform. http://www.lexicon.net/sjmachin/xlrd.htm I installed and working on the examples, I found its printing of cell's contents in a different manner. >>> import xlrd >>> book=xlrd.open

Problem with - WMI()

2006-09-27 Thread kath
Hi, the following is code snippet I used to run plink command from Python. If I run plink command directly it pops out a command prompt window. To make the command promot window invisible I used WMI as follows. The command runs perfect. But it throughs the error following the code snipet. def run