Re: [Tutor] Reading Excel Files

2010-06-22 Thread Alan Gauld
"Carlos Daniel Ruvalcaba Valenzuela" wrote I was wondering if anyone has worked with excel 2007 files (importing data from), I have done so for old format (xls) via a number of modules like xlrd and the old pyexcelerator, however none of those packages currently support new 2007 format, altho

Re: [Tutor] Calling a number's methods

2010-06-22 Thread Alan Gauld
"Mark Young" wrote I searched the internet, and found someone suggest adding spaces after each number, which indeed works properly. answer = 6 .__sub__(7 .__neg__()) answer 13 Why does this work? I don't even understand why python recognizes that I'm trying to access the numbers' __sub__

Re: [Tutor] Reading Excel Files

2010-06-22 Thread Carlos Daniel Ruvalcaba Valenzuela
That is what I'm currently doing (telling users to convert), however users tend to forget to save the file in old format or find it too much a hassle to do the extra step, in which case I would like to be able to read the new format, although I may just trow and error and recommend the user to conv

[Tutor] Calling a number's methods

2010-06-22 Thread Mark Young
Why does this work >>> a = 6 >>> b = 7 >>> answer = a.__sub__(b.__neg__()) >>> answer 13 but this does not? >>> answer = 6.__sub__(7.__neg__()) SyntaxError: invalid syntax I searched the internet, and found someone suggest adding spaces after each number, which indeed works properly. >>> answ

Re: [Tutor] Reading Excel Files

2010-06-22 Thread Lang Hurst
Carlos Daniel Ruvalcaba Valenzuela wrote: Hello list, I was wondering if anyone has worked with excel 2007 files (importing data from), I have done so for old format (xls) via a number of modules like xlrd and the old pyexcelerator, however none of those packages currently support new 2007 forma

Re: [Tutor] split struggle

2010-06-22 Thread Richard D. Moores
On Tue, Jun 22, 2010 at 15:09, Alan Gauld wrote: > > "Richard D. Moores" wrote > >> This does what I want, which is to do one of: >> 1. print all the elements of the list, lst. >> 2. print "Done" when "" is entered. >> 3. print the elements of lst whose indexes are entered. >> (sorry if all this

Re: [Tutor] split struggle

2010-06-22 Thread Richard D. Moores
On Tue, Jun 22, 2010 at 15:09, Alan Gauld wrote: > > "Richard D. Moores" wrote > >> This does what I want, which is to do one of: >> 1. print all the elements of the list, lst. >> 2. print "Done" when "" is entered. >> 3. print the elements of lst whose indexes are entered. >> (sorry if all this

Re: [Tutor] Time

2010-06-22 Thread Dave Angel
Ahmed AL-Masri wrote: Hi, I would calculate the running time of my simulation code. any one know how to do that? example def demo(): ### the starting point of time should be 0 f.simulate(data) ### the end of the class so need to find the time in Sec.? #

[Tutor] Reading Excel Files

2010-06-22 Thread Carlos Daniel Ruvalcaba Valenzuela
Hello list, I was wondering if anyone has worked with excel 2007 files (importing data from), I have done so for old format (xls) via a number of modules like xlrd and the old pyexcelerator, however none of those packages currently support new 2007 format, although xlrd may have support for it lat

Re: [Tutor] split struggle

2010-06-22 Thread Steven D'Aprano
On Wed, 23 Jun 2010 06:58:25 am Richard D. Moores wrote: > Please see my Python 3.1 code pasted at > . > > This does what I want, which is to do one of: > 1. print all the elements of the list, lst. > 2. print "Done" when "" is entered. > 3. print the elements o

Re: [Tutor] split struggle

2010-06-22 Thread Alan Gauld
"Richard D. Moores" wrote This does what I want, which is to do one of: 1. print all the elements of the list, lst. 2. print "Done" when "" is entered. 3. print the elements of lst whose indexes are entered. (sorry if all this is obvious) Now, the code works, but isn't there a better way to d

[Tutor] split struggle

2010-06-22 Thread Richard D. Moores
Please see my Python 3.1 code pasted at . This does what I want, which is to do one of: 1. print all the elements of the list, lst. 2. print "Done" when "" is entered. 3. print the elements of lst whose indexes are entered. (sorry if all this is obvious) Now,

Re: [Tutor] upgrade from 2.6.2 to 2.6.5?

2010-06-22 Thread Alex Hall
Thanks, I'll go upgrade then, and hope this fixes things with this package! On 6/22/10, Tim Golden wrote: > On 22/06/2010 13:40, Alex Hall wrote: >> Hi all, >> I am having problems with the Durus package, and I was told that >> changing Python versions might help. Most of the other dependencies o

Re: [Tutor] upgrade from 2.6.2 to 2.6.5?

2010-06-22 Thread Tim Golden
On 22/06/2010 13:40, Alex Hall wrote: Hi all, I am having problems with the Durus package, and I was told that changing Python versions might help. Most of the other dependencies of the project I have are 2.6 only, so I do not want to change versions from 2.6.x, but I would like to try upgrading

[Tutor] upgrade from 2.6.2 to 2.6.5?

2010-06-22 Thread Alex Hall
Hi all, I am having problems with the Durus package, and I was told that changing Python versions might help. Most of the other dependencies of the project I have are 2.6 only, so I do not want to change versions from 2.6.x, but I would like to try upgrading to 2.6.5 to see if that fixes things. Wi

Re: [Tutor] Time

2010-06-22 Thread Christian Witts
Ahmed AL-Masri wrote: Hi, I would calculate the running time of my simulation code. any one know how to do that? example def demo(): ### the starting point of time should be 0 f.simulate(data) ### the end of the class so need to find the time in Sec.? ###

[Tutor] Time

2010-06-22 Thread Ahmed AL-Masri
Hi, I would calculate the running time of my simulation code. any one know how to do that? example def demo(): ### the starting point of time should be 0 f.simulate(data) ### the end of the class so need to find the time in Sec.? ### print time in sec. if