Hi,
Thanks for the feedback.
I will add a trial section that doesn't require login so that new visitors
are able to give the website a try.
Regards,
Kok Cheng
-- Forwarded message --
From:
Date: Sun, Nov 28, 2010 at 2:41 AM
Subject: Tutor Digest, Vol 81, Issue 105
To: tutor@python.org
Send Tutor mailing list submissions to
tutor@python.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.python.org/mailman/listinfo/tutor
or, via email, send a message with subject or body 'help' to
tutor-requ...@python.org
You can reach the person managing the list at
tutor-ow...@python.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tutor digest..."
Today's Topics:
1. Python Exercise (Kok Cheng Tan)
2. Reload() in v3? WAS Re: IDEs (Alan Gauld)
3. Re: Reload() in v3? WAS Re: IDEs (Alan Gauld)
4. Re: Python Exercise (Mac Ryan)
5. Re: normalize an array (Eike Welk)
6. Python Exercise (pa...@cruzio.com)
7. Re: Python Exercise (Joel Schwartz)
8. Re: normalize an array (John)
--
Message: 1
Date: Sat, 27 Nov 2010 22:00:03 +0800
From: Kok Cheng Tan
To: tutor@python.org
Subject: [Tutor] Python Exercise
Message-ID:
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I created this website for practising python online:
http://www.pyschools.com.
Hope to gather feedback from people here who are interesting in
teaching and learning python.
Regards,
Kok Cheng
--
Message: 2
Date: Sat, 27 Nov 2010 15:04:57 -
From: "Alan Gauld"
To: tutor@python.org
Subject: [Tutor] Reload() in v3? WAS Re: IDEs
Message-ID:
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=response
"Steven D'Aprano" wrote
> The other nine times out of ten *wink* I need to do debugging, and I
> swap tabs and work in my interactive Python interpreter.
>
> import filename # first time only
> reload(filename) # all subsequent times
I'm working on the v3 version of my tutor and while testing some
module code I tried to reload the module in IDLE... I got an error:
>>> import os
>>> reload(os)
Traceback (most recent call last):
File "", line 1, in
reload(os)
NameError: name 'reload' is not defined
>>>
Has reload been removed in V3?
Whats the alternative? Does a repeated import auto-reload?
I'm surprised and confused...
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
--
Message: 3
Date: Sat, 27 Nov 2010 15:11:53 -
From: "Alan Gauld"
To: tutor@python.org
Subject: Re: [Tutor] Reload() in v3? WAS Re: IDEs
Message-ID:
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=response
"Alan Gauld" wrote
> Has reload been removed in V3?
> Whats the alternative? Does a repeated import auto-reload?
>
> I'm surprised and confused...
Found it, its been moved into the imp module.
You need to import imp and then do
imp.reload(foo)
>>> import os
>>> reload(os)
Traceback (most recent call last):
File "", line 1, in
reload(os)
NameError: name 'reload' is not defined
>>> import imp
>>> imp.reload(os)
>>>
I wonder why that was considered "a good idea"?
Alan G.
------
Message: 4
Date: Sat, 27 Nov 2010 18:12:59 +0100
From: Mac Ryan
To: tutor@python.org
Subject: Re: [Tutor] Python Exercise
Message-ID: <20101127181259.770ea...@jabbar>
Content-Type: text/plain; charset=US-ASCII
On Sat, 27 Nov 2010 22:00:03 +0800
Kok Cheng Tan wrote:
> I created this website for practising python online:
> http://www.pyschools.com. Hope to gather feedback from people here
> who are interesting in teaching and learning python.
Here you go with the first suggestion: remove the need to log in!
(Haven't really watched at the site content, given that I - like 99% of
the Internet users - wouldn't bother to login just to roam around a
site).
Mac.
--
Message: 5
Date: Sat, 27 Nov 2010 18:44:25 +0100
From: Eike Welk
To: tutor@python.org
Subject: Re: [Tutor] normalize an array
Message-ID: <201011271845.38868.eike.w...@gmx.net>
Content-Type: Text/Plain; charset="iso-8859-1"
Hello John!
On Friday 26.11.2010 23:23:51 Peter Otten wrote:
> John wrote:
> > I know this is a simple problem, but I want to do it the most
> > efficient way (that is vectorized...)
> >
> > import numpy as np
> >
> > a = np.array(([1,2,3,4],[1,.2,3,4],[1,22,3,4]))
> > b = np.sum(a,axis=1)
> >
> > for i,elem in enumerate(a):
> >