[Tutor] ssl error when trying to connect to https (also using timeoutsocket.py)

2007-03-07 Thread Tsila Hassine
Hello all, in my code i am importing timeoutsocket in order to set the time out of a connection. When i try to acces an https site I get the error: "TypeError: ssl() argument 1 must be _socket.socket, not _socketobject" when I am not using the timeoutsocket module, I don't have any problems. ho

Re: [Tutor] Passing a list, dict or tuple to MySQLdb?

2007-03-07 Thread Bill Campbell
On Wed, Mar 07, 2007, Alan Wardroper wrote: >I'm parsing some data to feed to a MySQL database, and would like to be >able to pass in a list (a dictionary or a series of tuples) in the >cursor.execute() or cursor.executemany() statement, but everything I've >tried raises errors. I'm sure it's a ma

[Tutor] Passing a list, dict or tuple to MySQLdb?

2007-03-07 Thread Alan Wardroper
I'm parsing some data to feed to a MySQL database, and would like to be able to pass in a list (a dictionary or a series of tuples) in the cursor.execute() or cursor.executemany() statement, but everything I've tried raises errors. I'm sure it's a matter of correct formatting the list as a sequenc

Re: [Tutor] Tutor Digest, Vol 37, Issue 22

2007-03-07 Thread Steve Maguire
-- Forwarded message -- From: Tim Golden <[EMAIL PROTECTED]> To: Date: Wed, 07 Mar 2007 15:48:20 + Subject: Re: [Tutor] Printing labels Steve Maguire wrote: > I am a Python beginner. For my first task I wanted to fix a program that I > originally wrote in Excel with VBA. I

Re: [Tutor] help:find a string in a text and replace it with a anotherstring

2007-03-07 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of mastjeptor regli > Sent: Wednesday, March 07, 2007 10:34 AM > To: tutor@python.org > Subject: [Tutor] help:find a string in a text and replace it > with a anotherstring > > Hi,folks. > At firs

[Tutor] help:find a string in a text and replace it with a another string

2007-03-07 Thread mastjeptor regli
Hi,folks. At first ,I have a question that I want to ask for help,it is how can I search a specific string in a text (such a in a word document) and replace it with another string? Second,if the text is changed dynamicly,can I use a variable string(has been assigned a string) to search in

Re: [Tutor] recommendation for good OO book?

2007-03-07 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Jeff Peery > Sent: Wednesday, March 07, 2007 10:15 AM > To: tutor@python.org > Subject: [Tutor] recommendation for good OO book? > > Hello, I've been using python for a few years now and I > rea

[Tutor] recommendation for good OO book?

2007-03-07 Thread Jeff Peery
Hello, I've been using python for a few years now and I really like it. Although i am beginning to realize I really don't utilize this object oriented stuff in a good way. Does anyone have a favorite book regarding the basics/intro to object oriented programming, how to write good OO code?? tha

Re: [Tutor] Printing labels

2007-03-07 Thread Tim Golden
Steve Maguire wrote: > I am a Python beginner. For my first task I wanted to fix a program that I > originally wrote in Excel with VBA. I want to create a mySQL database > holding my DVD collection, edit it in Python, and print labels for the > cases > with an index for filing and a catalog of a

[Tutor] Printing labels

2007-03-07 Thread Steve Maguire
I am a Python beginner. For my first task I wanted to fix a program that I originally wrote in Excel with VBA. I want to create a mySQL database holding my DVD collection, edit it in Python, and print labels for the cases with an index for filing and a catalog of all the titles their indices. T

[Tutor] trouble with objects, instances, type, and None in BeautifulSoup (and in general?)

2007-03-07 Thread Clay Wiedemann
Still learning, please bear with me if my lingo is a little off. But I think I have a better handle on my problem. My objective: 1. get a starting point on a web page, walk down the page until hitting an HR tag 2. Along the way, test for certain markers that allow me to get various strings and com

[Tutor] BeautifulSoup and Python 2.5

2007-03-07 Thread Kent Johnson
This seems to be a problem with BeautifulSoup and Python 2.5. I spent some time looking at it this morning and tracked down one problem. Below is the email I sent to the BeautifulSoup maintainer. I doubt that either of these problems will actually be a problem in practice. I suggest you install

Re: [Tutor] path to use for setting the environment variable PYTHONDOCS?

2007-03-07 Thread Dick Moores
At 03:15 AM 3/7/2007, Kent Johnson wrote: >Dick Moores wrote: > > At 02:41 PM 3/6/2007, Alan Gauld wrote: > > > >> "Dick Moores" <[EMAIL PROTECTED]> wrote > >> > >>> Sorry, topic and keyword documentation is not available because the > >>> Python > >>> HTML documentation files could not be found.

Re: [Tutor] path to use for setting the environment variable PYTHONDOCS?

2007-03-07 Thread Kent Johnson
Dick Moores wrote: > At 02:41 PM 3/6/2007, Alan Gauld wrote: > >> "Dick Moores" <[EMAIL PROTECTED]> wrote >> >>> Sorry, topic and keyword documentation is not available because the >>> Python >>> HTML documentation files could not be found. If you have installed >>> them, >>> please set the envir

Re: [Tutor] trouble understanding the python environment in OSX

2007-03-07 Thread danielle davout
probably it is not the same issue but ... I've got a problem with BeautifulSoup that I've never encounter before ( I've got a new computer and a brand new installation Python 2.5 (r25:51908, Sep, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32 ) When I run BeautifulSoupTests.py ( If I am not mistak