I want to send an email from a google mail account so that the sender
name will be 'User Name' instead of 'usern...@gmail.com' in the inbox.
this is the code I use: (I'm using python 2.5)
>>>import smtplib
>>>g=smtplib.SMTP('smtp.googlemail.com')
>>>g.ehlo();g.starttls();g.ehlo()
>>>g.login
it means that it's type is "long". writing an expression makes python
return its value, so writing 2**1000 will return a number that ends
with L to show that it's a long integer. but writing "print 2**1000"
will print the number without the L. I don't know if there is a way to
disable this feature,
> You aren't doing anything wrong. The print function writes to
> sys.stdout.
> sys.stdout is a buffered file which means it doesn''t write to its
> output
> immediately but waits until enough data is in its buffer to make it
> worthwhile - or until explicitly told to flush itself.
>
> Because you
Thanks for the answers. I didn't have this problem with python 2.5. I
know I can use stdout instead, but I want to know what I'm doing
wrong.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
I downloaded python 3.0.1 today and started experimenting with the new
print statement.
>>>import time
>>>for l in 'the answer':
...print(l,end='')
...time.sleep(0.1)
the code is supposed to print "the answer" with a 0.1 second long
pause between the letters. instead, it waits for 1 secon