Re: [Tutor] So close! But ... error: (10054, 'Connection reset by peer')

2006-07-16 Thread Michael P. Reilly
You are running on a PC, which doesn't have a SMTP server running on it.  The default hostname for smtplib.SMTP().connect() is to localhost (your own machine).   You will need to find out the hostname of the mail server that your ISP provides.  You probably set it when you set up your email (based

Re: [Tutor] create 1000 000 variables

2006-07-16 Thread Danny Yoo
>> > In fact I want to create a list of variables from the list of strings >> > >> > Example: ['var1', 'var2', 'var3'] - list of strings >> >> Do you know about "dictionaries" yet? > Yes. I know about dictionaries. Hello, Can you show us an example of the kind of dictionary usage you've us

Re: [Tutor] How do you implement a config file?

2006-07-16 Thread Adam
On 16/07/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Tracy R Reed wrote:> I am writing a small python application that needs a few variables to be> end user configurable. Right now I just have the variables right up> front where the user can tweak them in the program code and a big > commented line

Re: [Tutor] create 1000 000 variables

2006-07-16 Thread Kent Johnson
Michael P. Reilly wrote: > Good. But one VERY important point to note is that that you are not working > with "variables" here. You are working with members of a class instance. > This is a very different beast. You could just use getattr(), setattr() and > delattr() for these. > > But continuin

Re: [Tutor] How do you implement a config file?

2006-07-16 Thread Kent Johnson
Tracy R Reed wrote: > I am writing a small python application that needs a few variables to be > end user configurable. Right now I just have the variables right up > front where the user can tweak them in the program code and a big > commented line that says "Nothing editable past this point." But

[Tutor] So close! But ... error: (10054, 'Connection reset by peer')

2006-07-16 Thread Grady Henry
I think that I am so close to getting this simple program to run correctly:   # Import smtplib for the actual sending functionimport smtplib   # Import the email modules we'll needfrom email.MIMEText import MIMEText   # Open a plain text file for reading.  For this example, assume that# the

Re: [Tutor] create 1000 000 variables

2006-07-16 Thread Сергій
> In fact I want to create a list of variables from the list of strings>> Example: ['var1', 'var2', 'var3'] - list of strings Ok, let's stop for the moment.Do you know about "dictionaries" yet?  If not, we should point this out to you, because they solve the problem you describe.     Yes. I kno