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
>> > 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
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
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
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
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
> 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