On Thu, Sep 15, 2011 at 4:01 AM, c smith wrote:
> hi list, i am trying the MIT opencourseware assignments.
> one was to find the 1000th prime.
> since this isn't actually my homework, I modified the solution as I would
> like to collect lists of primes and non-primes up to N, also some log()
> rat
hi list, i am trying the MIT opencourseware assignments.
one was to find the 1000th prime.
since this isn't actually my homework, I modified the solution as I would
like to collect lists of primes and non-primes up to N, also some log()
ratio to one comparison.
here is what I came up with on paper:
On Wed, Sep 14, 2011 at 1:13 PM, Walter Prins wrote:
> On 14 September 2011 21:03, James Hartley wrote:
>
>> On Wed, Sep 14, 2011 at 12:54 PM, Walter Prins wrote:
>>
> Aside: If you want to interact with a mail server there's probably better
>> modules to be using than the telnet module.
>>
>>>
On 14 September 2011 21:03, James Hartley wrote:
> On Wed, Sep 14, 2011 at 12:54 PM, Walter Prins wrote:
>
>> Hence, try using read_some() instead of read_very_eager().
>>
>
> read_some() captures what I was hoping to catch. Thanks!
>
>
>>
>> Aside: If you want to interact with a mail server th
On Wed, Sep 14, 2011 at 12:54 PM, Walter Prins wrote:
> Hence, try using read_some() instead of read_very_eager().
>
read_some() captures what I was hoping to catch. Thanks!
>
> Aside: If you want to interact with a mail server there's probably better
> modules to be using than the telnet mod
On 14 September 2011 20:44, James Hartley wrote:
> #!/usr/bin/env python
>
> import telnetlib
>
> if __name__ == '__main__':
> print 'begin'
> tn = telnetlib.Telnet('gmail-smtp-in.l.google.com', 25)
> s = tn.read_very_eager()
> print s
> tn.write("helo\n")
> s = tn.read_ve
I'm trying to programmatically create a telnet session. Within the
interactive environment, this appears to work very well as server messages
can be saved as strings:
$ python
Python 2.7.1 (r271:86832, Sep 3 2011, 01:32:33)
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or