Re: [Tutor] Sending email from windows python

2006-12-26 Thread ALAN GAULD

> How do we run sendmail from windows

Searching Google for 'sendmail windows' gave me this:

http://www.indigostar.com/sendmail.htm

as the first link...

> I found Xmail
> 
> http://www.xmailserver.org/

But any smtp server will do just as well.

Alan G.

> > > how do we use sendmail to send mail from windows
> > > smtplib works in unix flawlessly
> >
> > It should work in windows too provided you have an
> > SMTP server such as sendmail running somewhere.
> >
> > Alan G.
> >
> > ___
> >
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] code in a folder

2006-12-26 Thread linda.s
I read an example code, with something like:
from a.b import *
I checked and found a is a folder name and b is python code in that
folder. I typed the above code in the IDLE and no error was reported.
Why a.b works?
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Oscar CTR Savaryn is out of the office.

2006-12-26 Thread oscar . ctr . savaryn




I will be out of the office starting  12/26/2006 and will not return until
01/08/2007.

I will respond to your message when I return.
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Sending email from windows python

2006-12-26 Thread Art Hollingsworth
I can think of at least four free ones for Windows off the top of my head. 
However hMailServer is easy to set up and use. I have used it myself in the 
past. 

I'll leave it as an exercise to you to find it's website. Also, learn to use 
Google. It is your friend. 

- Original Message - 
From: [EMAIL PROTECTED] 
To: ALAN GAULD <[EMAIL PROTECTED]> 
Cc: tutor@python.org 
Sent: Tuesday, December 26, 2006 0:23:08 AM GMT-0700 US/Mountain 
Subject: Re: [Tutor] Sending email from windows python 


indigo is paid 
do u know free windows smtp servers 


On 12/25/06, ALAN GAULD < [EMAIL PROTECTED] > wrote: 
> How do we run sendmail from windows 

Searching Google for 'sendmail windows' gave me this: 

http://www.indigostar.com/sendmail.htm 

as the first link... 

> I found Xmail 
> 
> http://www.xmailserver.org/ 

But any smtp server will do just as well. 

Alan G. 

> > > how do we use sendmail to send mail from windows 
> > > smtplib works in unix flawlessly 
> > 
> > It should work in windows too provided you have an 
> > SMTP server such as sendmail running somewhere. 
> > 
> > Alan G. 
> > 
> > ___ 
> > 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com 



-- 
http://www.mychinavacation.com 
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] about array

2006-12-26 Thread Alan Gauld

"linda.s" <[EMAIL PROTECTED]> wrote 

 a
> array([[ 0., 1., 2., 3., 4., 5.],
> [ 6., 7., 8., 9., 10., 11.],
> [ 12., 13., 14., 15., 16., 17.],
> [ 18., 19., 20., 21., 22., 23.],
> [ 24., 25., 26., 27., 28., 29.]])

OK, This sets up your test array.

 a[1:3,:-1:2] # a[i,j] for i=1,2 and j=0,2,4

And this passes two slices.
The first is 1:3 which means 1,2 - normal slice behaviour
he second is :-1:2 which uses extended slice syntax to 
specify a stepsize. So the slice says go from 0 (default) 
to the last element(-1) using a step sizeof 2, which is 0,2,4

So we extract the 0,2,4 elements from rows 1,2 to get:

> array([[ 6., 8., 10.],
> [ 12., 14., 16.]])

 a[::3,2:-1:2] # a[i,j] for i=0,3 and j=2,4

Similarly the first slice here is the whole array(:) with a 
step size of 3, thus 0,3
The second slice is 2:-1:2 which means in practice start 
at 2 and go to the end stepping in 2s, which is: 2,4
So this time we take the 2,4 index items from rows 0,3
which is:

> array([[ 2., 4.],
> [ 20., 22.]])

Its just normal slicing notation but with a pair of them 
inside the brackets instead of one.

Which module are you using that supports this? 
I've never seen it before.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] code in a folder

2006-12-26 Thread Alan Gauld

"linda.s" <[EMAIL PROTECTED]> wrote

>I read an example code, with something like:
> from a.b import *
> I checked and found a is a folder name and b is python code in that
> folder. I typed the above code in the IDLE and no error was 
> reported.
> Why a.b works?

This is Python "package" notation.
You can make a folder of python modules into a package
by adding a file called __init__.py. The details are described
here:

http://docs.python.org/tut/node8.html#SECTION00840

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] about array

2006-12-26 Thread linda.s
On 12/26/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> "linda.s" <[EMAIL PROTECTED]> wrote
>
>  a
> > array([[ 0., 1., 2., 3., 4., 5.],
> > [ 6., 7., 8., 9., 10., 11.],
> > [ 12., 13., 14., 15., 16., 17.],
> > [ 18., 19., 20., 21., 22., 23.],
> > [ 24., 25., 26., 27., 28., 29.]])
>
> OK, This sets up your test array.
>
>  a[1:3,:-1:2] # a[i,j] for i=1,2 and j=0,2,4
>
> And this passes two slices.
> The first is 1:3 which means 1,2 - normal slice behaviour
> he second is :-1:2 which uses extended slice syntax to
> specify a stepsize. So the slice says go from 0 (default)
> to the last element(-1) using a step sizeof 2, which is 0,2,4
>
> So we extract the 0,2,4 elements from rows 1,2 to get:
>
> > array([[ 6., 8., 10.],
> > [ 12., 14., 16.]])
>
>  a[::3,2:-1:2] # a[i,j] for i=0,3 and j=2,4
>
> Similarly the first slice here is the whole array(:) with a
> step size of 3, thus 0,3
> The second slice is 2:-1:2 which means in practice start
> at 2 and go to the end stepping in 2s, which is: 2,4
> So this time we take the 2,4 index items from rows 0,3
> which is:
>
> > array([[ 2., 4.],
> > [ 20., 22.]])
>
> Its just normal slicing notation but with a pair of them
> inside the brackets instead of one.
>
> Which module are you using that supports this?
> I've never seen it before.

It is from Hans' Book 'Python Scripting for Computational Science'. He
uses Numpy: Numeric
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor