[Tutor] Importing Excel sheet data

2007-09-06 Thread János Juhász
Dear Saradhi, I am using COM on Win32 for this, based on the sample of Mark Hammond Andy Robinson in the Programing Python on Win32 book. That is a fairly simple way to do that. The code itself can be downloaded from http://examples.oreilly.com/pythonwin32/ppw32_samples.zip You can find

Re: [Tutor] Importing Excel sheet data

2007-09-06 Thread Steve Willoughby
saradhi dinavahi wrote: I am new to the Python Programming. I want to Import Excel sheet data using Python. Can any one please provide me the code and explain the basic steps and method of executing the code. If you can get your Excel data into CSV format, the csv module others have already

Re: [Tutor] Importing Excel sheet data

2007-09-06 Thread Kent Johnson
Ian Witham wrote: HI Saradhi, I too am fairly new to Python, but I use the csv module successfully for my work. Could you be a little more specific as to what your requirements are and where you are finding difficulty? Ian. On 9/6/07, *saradhi dinavahi* [EMAIL PROTECTED]

Re: [Tutor] unicode encoding hell

2007-09-06 Thread Kent Johnson
David Bear wrote: feedp.entry.title.decode('utf-8', 'xmlcharrefreplace') I assume it would take any unicode character and 'do the right thing', including replacing higher ordinal chars with xml entity refs. But I still get UnicodeEncodeError: 'ascii' codec can't encode character

[Tutor] Socket Timeout Handling

2007-09-06 Thread wormwood_3
I am trying to figure out the optimal way to make socket connections (INET) and check for timeouts. The socket module has settimeout(timeout) and setdefaulttimeout(timeout). However, so far as I can tell, these apply to socket objects. The type of socket connection I want to make is

[Tutor] Python / CGI

2007-09-06 Thread Fiyawerx
Hi guys, quick question, I've been trying to learn python lately, and have written a few little apps to help with some day to day stuff I do, and recently my fiance asked me if it was possible to come up with a simple web based schedule she can use with the other teachers in her school to schedule

Re: [Tutor] Python / CGI

2007-09-06 Thread Michael Connors
Hi, If you have your own server to run it on, I think it would make sense to use one of the Python web frameworks that are out there. I used cherrypy for my first web-based python project and I found it very easy to learn and develop in quickly. Regards, Michael On 06/09/07, Fiyawerx [EMAIL

Re: [Tutor] Python / CGI

2007-09-06 Thread Fiyawerx
Thanks Michael, I'll be using my dreamhost account, and I'm pretty sure cherrypy works there, will check into it. On 9/6/07, Michael Connors [EMAIL PROTECTED] wrote: Hi, If you have your own server to run it on, I think it would make sense to use one of the Python web frameworks that are out

Re: [Tutor] Python / CGI

2007-09-06 Thread Eric Brunson
Michael Connors wrote: Hi, If you have your own server to run it on, I think it would make sense to use one of the Python web frameworks that are out there. I used cherrypy for my first web-based python project and I found it very easy to learn and develop in quickly. That's debatable. I

Re: [Tutor] Python / CGI

2007-09-06 Thread Kent Johnson
Fiyawerx wrote: Hi guys, quick question, I've been trying to learn python lately, and have written a few little apps to help with some day to day stuff I do, and recently my fiance asked me if it was possible to come up with a simple web based schedule she can use with the other teachers in

Re: [Tutor] Python / CGI

2007-09-06 Thread Kent Johnson
Eric Brunson wrote: Michael Connors wrote: Hi, If you have your own server to run it on, I think it would make sense to use one of the Python web frameworks that are out there. I used cherrypy for my first web-based python project and I found it very easy to learn and develop in quickly.

Re: [Tutor] Python / CGI

2007-09-06 Thread Eric Brunson
Kent Johnson wrote: Eric Brunson wrote: Michael Connors wrote: Hi, If you have your own server to run it on, I think it would make sense to use one of the Python web frameworks that are out there. I used cherrypy for my first web-based python project and I found it very easy to

[Tutor] getting iteration level

2007-09-06 Thread David Bear
Lets say I have a list object that I iterate over like this: for item in myList: process(item) During execution of the for loop something happens and I want to know how many items have be iterated over, how do I find out? Without resorting to some counter inside the loop, is there some python

Re: [Tutor] Dynamically changing a class

2007-09-06 Thread Eike Welk
On Wednesday 05 September 2007 16:59, Jason Doege wrote: Thanks for the good and useful information on this. Now for the why... I am building an API and for various reasons I have chosen Python to implement it. I'd like to separate the implementation from the interface as, for instance, C++

Re: [Tutor] Python / CGI

2007-09-06 Thread Eric Walstad
Michael Connors wrote: Hi, If you have your own server to run it on, I think it would make sense to use one of the Python web frameworks that are out there. I used cherrypy for my first web-based python project and I found it very easy to learn and develop in quickly. Regards, Michael I'd

Re: [Tutor] getting iteration level

2007-09-06 Thread Kent Johnson
David Bear wrote: Lets say I have a list object that I iterate over like this: for item in myList: process(item) During execution of the for loop something happens and I want to know how many items have be iterated over, how do I find out? Without resorting to some counter inside the

Re: [Tutor] Socket Timeout Handling

2007-09-06 Thread wormwood_3
Since no one bit on this yet, let me simplify to the core issue I am having: What is the best practice for checking for network connectivity errors when making network calls? Is it better to wrap the functions that make said calls in threads and time them? Or to use timeout variables for

Re: [Tutor] Python / CGI

2007-09-06 Thread Steve Willoughby
On Thu, Sep 06, 2007 at 11:35:14AM -0400, Fiyawerx wrote: recently my fiance asked me if it was possible to come up with a simple web based schedule she can use with the other teachers in her school to schedule library time. (She's the librarian). Basically, it will be a small calendar like

Re: [Tutor] Python / CGI

2007-09-06 Thread Alan Gauld
Fiyawerx [EMAIL PROTECTED] wrote Hi guys, quick question, I've been trying to learn python lately, and have written a few little apps to help with some day to day stuff I do, and recently my fiance asked me if it was possible to come up with a simple web based schedule she can use with

[Tutor] manually sorting variables

2007-09-06 Thread Christopher Spears
I'm working out of Core Python Programming (2nd Edition) by Wesley Chun. Here is the problem: Have the user enter three numeric values and store them in three different variables. Without using lists or sorting algorithms, manually sort these three numbers from smallest to largest. Here is

Re: [Tutor] manually sorting variables

2007-09-06 Thread Kent Johnson
Christopher Spears wrote: I'm working out of Core Python Programming (2nd Edition) by Wesley Chun. Here is the problem: Have the user enter three numeric values and store them in three different variables. Without using lists or sorting algorithms, manually sort these three numbers

[Tutor] dynamic attribute assignment

2007-09-06 Thread John
I've just noticed that you can use the import statement to import variables, such that a simple file such as vars.py: # File with predefined variables var1= 'some text' var2= 2 var3=['a','b','c'] Would then, upon import, provide: vars.var1 'some text' vars.var2 2 vars.var3 ['a','b','c'] This

Re: [Tutor] Socket Timeout Handling

2007-09-06 Thread Alan Gauld
wormwood_3 [EMAIL PROTECTED] wrote Since no one bit on this yet, let me simplify to the core issue I am having: That may be because your question ventures into fairly deep areas of networking that most folk who are just learning Python(ie readers of this list) have probably not encountered.