Re: [Tutor] smtplib with yahoo smtp server

2006-02-01 Thread Ewald Ertl
Hi! I made a copy of the source you posted. I just got a problem as expected when doing the session.login() because the access-data is invalid. The connection via the smtplib.SMTP() could be established. Perhaps there is something wrong with your namelookup. Can you try a call in the

Re: [Tutor] smtplib with yahoo smtp server

2006-02-01 Thread Ewald Ertl
Hi! Intercodes wrote: Ewald, First off, thanks for stopping by. The connection via the smtplib.SMTP() could be established. I dont think so. I think it fails before the login(). -- ex= smtplib.SMTP('smtp.mail.yahoo.com

Re: [Tutor] smtplib with yahoo smtp server

2006-02-01 Thread Intercodes
Ewald, -- ex= smtplib.SMTP('smtp.mail.yahoo.com http://smtp.mail.yahoo.com ') Traceback (most recent call last): File stdin, line 1, in ? File /usr/lib/python2.4/smtplib.py, line 241, in __init__ (code, msg) = self.connect (host, port) File

Re: [Tutor] smtplib with yahoo smtp server

2006-02-01 Thread Ewald Ertl
Hi! Intercodes wrote: My nssswitch.conf -- passwd: compat group: compat hosts: files dns networks: files dns services: files protocols: files rpc:files ethers: files netmasks: files netgroup:

[Tutor] Todays Learning Python Question From a Newbie ;)

2006-02-01 Thread Jon Moore
Hi,Ok its the last exercise in the chapter of the python book (Python for the absolute beginner) I am working my way through.I have been learning about functions using a tic-tac-toe game as an example and I understand it fairly clearly, however the author says the following: Write a new

[Tutor] Re : Project Work

2006-02-01 Thread Chandrashekar Jayaraman
I m doing a project using Python and Bluetooth . I tried running the sample programs given with the pybluez-0.5 distro with python 2.4 . The socket program s just dont seem to run . However the inquiry.py program run s perfectly. ne solutions ? ___

Re: [Tutor] Re : Project Work

2006-02-01 Thread Kent Johnson
Chandrashekar Jayaraman wrote: I m doing a project using Python and Bluetooth . I tried running the sample programs given with the pybluez-0.5 distro with python 2.4 . The socket program s just dont seem to run . However the inquiry.py program run s perfectly. ne solutions ? just dont

Re: [Tutor] smtplib with yahoo smtp server

2006-02-01 Thread Intercodes
Ewald,Here, I think is a strange problem. You can not resolve your own hostname. Is there no entry in /etc/hosts for linux with the IP-Address of your server?If not, try to insert such an entry. Thanks for all your suggestions. I inserted my IP address for 'linux' into /etc/hosts. Now

Re: [Tutor] smtplib with yahoo smtp server

2006-02-01 Thread Python
On Wed, 2006-02-01 at 18:51 +0530, Intercodes wrote: Received: by wproxy.gmail.com with SMTP id i23so141320wra for tutor@python.org; Wed, 01 Feb 2006 05:21:36 -0800 (PST) Received: by 10.65.228.15 with SMTP id f15mr63752qbr; Wed, 01 Feb 2006 05:21:36 -0800 (PST) Received: by

Re: [Tutor] Newbie question re. Functions

2006-02-01 Thread Ed Singleton
On 31/01/06, Jon Moore [EMAIL PROTECTED] wrote: Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1. The function looks like this: def ask_number(question, low, high): Ask for a number within the range response =

Re: [Tutor] Newbie question re. Functions

2006-02-01 Thread Jon Moore
Thats fine, but what differance does it make?I can see no way that it improves the code.I assume later on when the function is called, it should look as follows:move = ask_number(Where will you move? (0-8): , 0, NUM_SQUARES, 1) JonOn 01/02/06, Ed Singleton [EMAIL PROTECTED] wrote: On 31/01/06, Jon

Re: [Tutor] Todays Learning Python Question From a Newbie ;)

2006-02-01 Thread Bob Gailer
Jon Moore wrote: Hi, Ok its the last exercise in the chapter of the python book (Python for the absolute beginner) I am working my way through. I have been learning about functions using a tic-tac-toe game as an example and I understand it fairly clearly, however the author says the

Re: [Tutor] mapping problem

2006-02-01 Thread Hugo González Monteverde
What about choosing a native Python data structure for this? A list of attributes comes to mind, as presence of one can be easily tested with if x in attributes: do_something Here's a test: elements= {} elements['boat'] = ['a', 'b', 'j', 'k'] 'a' in elements['boat'] True Then it

Re: [Tutor] mapping problem

2006-02-01 Thread Danny Yoo
A snippet of the problem is here. The terms in file as tab delim manner. [data cut] Now my question is to enrich members that have identical lineage with different leaf. 'i.e': a b c d - van suv. Hi Srinivas, You're starting to use the vocabulary of tree data structures here. Let's

Re: [Tutor] Exit a child thread using threading.Thread() object

2006-02-01 Thread Bernard Lebel
Thanks a lot Kent. The exit call would be made from the same thread whose fate is to terminate. Bernard On 1/31/06, Kent Johnson [EMAIL PROTECTED] wrote: Bernard Lebel wrote: A quick question. I have started a child thread using the threading.Thread class. Is there any way to cleanly

Re: [Tutor] mapping problem

2006-02-01 Thread Kent Johnson
Srinivas Iyyer wrote: Dear group, I have a problem in finding a method to solve a problem where I want to walk through a lineage of terms and find group them from right to left. A snippet of the problem is here. The terms in file as tab delim manner. a b c d

[Tutor] printing the random seed?

2006-02-01 Thread kevin parks
hi. I am having some fun with python and making multiple runs on an algorhythm and sometimes getting some fun stuff that i would like to be able to reproduce, but there are some random elements in it. I wonder is there a way to see the random seed, and make note of it so that you could then

[Tutor] need to get unique elements out of a 2.5Gb file

2006-02-01 Thread Srinivas Iyyer
Hi Group, I have a file which is 2.5 Gb., TRIM54 NM_187841.1 GO:0004984 TRIM54 NM_187841.1 GO:0001584 TRIM54 NM_187841.1 GO:0003674 TRIM54 NM_187841.1 GO:0004985 TRIM54 NM_187841.1 GO:0001584 TRIM54 NM_187841.1 GO:0001653 TRIM54 NM_187841.1 GO:0004984 There

Re: [Tutor] printing the random seed?

2006-02-01 Thread Danny Yoo
I am having some fun with python and making multiple runs on an algorhythm and sometimes getting some fun stuff that i would like to be able to reproduce, but there are some random elements in it. I wonder is there a way to see the random seed, and make note of it so that you could then set

Re: [Tutor] printing the random seed?

2006-02-01 Thread kevin parks
Danny (hope you are good!) co, I see that biz about random.seed()... but in the absence of setting that ... does it just grab a value from the system clock? Is there a way to just let it generate it's usual, known seed... but then observe what that is in case you get an especially good run of

Re: [Tutor] need to get unique elements out of a 2.5Gb file

2006-02-01 Thread Danny Yoo
On Wed, 1 Feb 2006, Srinivas Iyyer wrote: I have a file which is 2.5 Gb., [data cut] There are many duplicate lines. I wanted to get rid of the duplicates. Hi Srinivas, When we deal with such large files, we do have to be careful and aware of issues like the concept of memory. I

Re: [Tutor] printing the random seed?

2006-02-01 Thread Danny Yoo
On Thu, 2 Feb 2006, kevin parks wrote: Danny (hope you are good!) co, I see that biz about random.seed()... but in the absence of setting that ... does it just grab a value from the system clock? Yes. Here's what the documentation says officially: current system time is also used to