I started seting up django. the only issue I am having is that all instructions seem to assume that I am on linux.Don&#39;t suppose there are any good instructions for those on a windows based system.<br><br><div class="gmail_quote">
On Sat, Sep 25, 2010 at 8:00 PM,  <span dir="ltr">&lt;<a href="mailto:tutor-request@python.org">tutor-request@python.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Send Tutor mailing list submissions to<br>
        <a href="mailto:tutor@python.org">tutor@python.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:tutor-request@python.org">tutor-request@python.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:tutor-owner@python.org">tutor-owner@python.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Tutor digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: pure function problem (Dave Angel)<br>
   2. Re: pure function problem (Roelof Wobben)<br>
   3. Re: Plotting a Linear Equation (<a href="mailto:kb1pkl@aim.com">kb1pkl@aim.com</a>)<br>
   4. Re: list.append(x) but at a specific &#39;i&#39; (Norman Khine)<br>
   5. Python And reading the Web - Javascript (Sayth Renshaw)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 24 Sep 2010 06:29:03 -0400<br>
From: Dave Angel &lt;<a href="mailto:davea@ieee.org">davea@ieee.org</a>&gt;<br>
To: Roelof Wobben &lt;<a href="mailto:rwobben@hotmail.com">rwobben@hotmail.com</a>&gt;<br>
Cc: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] pure function problem<br>
Message-ID: &lt;<a href="mailto:4C9C7D6F.5080700@ieee.org">4C9C7D6F.5080700@ieee.org</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
  On 2:59 PM, Roelof Wobben wrote:<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------<br>
&gt;&gt; From: <a href="mailto:steve@pearwood.info">steve@pearwood.info</a><br>
&gt;&gt; &lt;snip&gt;<br>
&gt;&gt; On Fri, 24 Sep 2010 06:20:25 am Roelof Wobben wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; time =ijd()<br>
&gt;&gt; [...]<br>
&gt;&gt;&gt; print time(uitkomst)<br>
&gt;&gt; Why are you calling time as a function, when it is a tijd instance?<br>
&gt;&gt;<br>
&gt;&gt; &lt;snip&gt;<br>
&gt;<br>
&gt; Hello Steve,<br>
&gt;<br>
&gt; I found this in my tutorial.<br>
&gt;<br>
&gt; 13.8. Instances as return values?<br>
&gt; Functions can return instances. For example, find_center takes a Rectangle as an argument and returns a Point that contains the coordinates of the center of the Rectangle:<br>
&gt; def find_center(box):<br>
&gt;      p =oint()<br>
&gt;      p.x =ox.corner.x + box.width/2.0<br>
&gt;      p.y =ox.corner.y - box.height/2.0<br>
&gt;      return p<br>
&gt; To call this function, pass box as an argument and assign the result to a variable:<br>
&gt;&gt;&gt;&gt; center =ind_center(box)<br>
&gt;&gt;&gt;&gt; print_point(center)<br>
&gt; (50.0, 100.0)<br>
&gt;<br>
&gt;<br>
&gt; So i followed it but appearently not the good way.<br>
&gt;<br>
&gt; Roelof<br>
There&#39;s a big difference between   print_point() and   print time().<br>
<br>
print_point() in your tutorial is a function, presumably defined<br>
someplace else.<br>
<br>
You used print time(),  (no underscore), which uses the print statement,<br>
and tries to call a function called time().<br>
<br>
Since you defined time as an instance of your class, and didn&#39;t do<br>
anything special, it&#39;s not callable.<br>
<br>
DaveA<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 24 Sep 2010 10:40:46 +0000<br>
From: Roelof Wobben &lt;<a href="mailto:rwobben@hotmail.com">rwobben@hotmail.com</a>&gt;<br>
Cc: &lt;<a href="mailto:tutor@python.org">tutor@python.org</a>&gt;<br>
Subject: Re: [Tutor] pure function problem<br>
Message-ID: &lt;SNT118-W46627FE73899BE912DE70DAE620@phx.gbl&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
<br>
<br>
<br>
----------------------------------------<br>
&gt; Date: Fri, 24 Sep 2010 06:29:03 -0400<br>
&gt; From: <a href="mailto:davea@ieee.org">davea@ieee.org</a><br>
&gt; To: <a href="mailto:rwobben@hotmail.com">rwobben@hotmail.com</a><br>
&gt; CC: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
&gt; Subject: Re: [Tutor] pure function problem<br>
&gt;<br>
&gt; On 2:59 PM, Roelof Wobben wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ----------------------------------------<br>
&gt;&gt;&gt; From: <a href="mailto:steve@pearwood.info">steve@pearwood.info</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Fri, 24 Sep 2010 06:20:25 am Roelof Wobben wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; time =ijd()<br>
&gt;&gt;&gt; [...]<br>
&gt;&gt;&gt;&gt; print time(uitkomst)<br>
&gt;&gt;&gt; Why are you calling time as a function, when it is a tijd instance?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hello Steve,<br>
&gt;&gt;<br>
&gt;&gt; I found this in my tutorial.<br>
&gt;&gt;<br>
&gt;&gt; 13.8. Instances as return values?<br>
&gt;&gt; Functions can return instances. For example, find_center takes a Rectangle as an argument and returns a Point that contains the coordinates of the center of the Rectangle:<br>
&gt;&gt; def find_center(box):<br>
&gt;&gt; p =oint()<br>
&gt;&gt; p.x =ox.corner.x + box.width/2.0<br>
&gt;&gt; p.y =ox.corner.y - box.height/2.0<br>
&gt;&gt; return p<br>
&gt;&gt; To call this function, pass box as an argument and assign the result to a variable:<br>
&gt;&gt;&gt;&gt;&gt; center =ind_center(box)<br>
&gt;&gt;&gt;&gt;&gt; print_point(center)<br>
&gt;&gt; (50.0, 100.0)<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; So i followed it but appearently not the good way.<br>
&gt;&gt;<br>
&gt;&gt; Roelof<br>
&gt; There&#39;s a big difference between print_point() and print time().<br>
&gt;<br>
&gt; print_point() in your tutorial is a function, presumably defined<br>
&gt; someplace else.<br>
&gt;<br>
&gt; You used print time(), (no underscore), which uses the print statement,<br>
&gt; and tries to call a function called time().<br>
&gt;<br>
&gt; Since you defined time as an instance of your class, and didn&#39;t do<br>
&gt; anything special, it&#39;s not callable.<br>
&gt;<br>
&gt; DaveA<br>
&gt;<br>
<br>
Oke,<br>
<br>
I see it now.<br>
I have to us a function that i had to write a few questions before.<br>
<br>
Thanks everybody<br>
<br>
Roelof<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 24 Sep 2010 12:26:31 -0400 (EDT)<br>
From: <a href="mailto:kb1pkl@aim.com">kb1pkl@aim.com</a><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] Plotting a Linear Equation<br>
Message-ID: &lt;<a href="mailto:8CD2A1C6185AFCF-854-182@webmail-m060.sysops.aol.com">8CD2A1C6185AFCF-854-182@webmail-m060.sysops.aol.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;; format=flowed<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Greg &lt;<a href="mailto:gregbair@gmail.com">gregbair@gmail.com</a>&gt;<br>
To: tutor &lt;<a href="mailto:tutor@python.org">tutor@python.org</a>&gt;<br>
Sent: Fri, Sep 24, 2010 3:29 am<br>
Subject: Re: [Tutor] Plotting a Linear Equation<br>
<br>
<br>
On Thu, Sep 23, 2010 at 10:51 PM, Corey Richardson &lt;<a href="mailto:kb1pkl@aim.com">kb1pkl@aim.com</a>&gt;<br>
wrote:<br>
<br>
?Hello tutors. Probably the wrong mailing list, but someone might know.<br>
I want to use matplotlib (or similar) to plot an equation in<br>
slope-intercept (y=mx+b) or standard form (Ax + By = C). As far as I&#39;ve<br>
read and tested, you can only plot with a series of points. I could<br>
make two points out of those manually, but I was wondering if anyone<br>
knew of an easier way. Thanks.<br>
<br>
<br>
<br>
You could just have your program compute the x- and y- intercepts, then<br>
plug them into matplotlib. ?Am I correct in that??<br>
<br>
<br>
--<br>
Greg Bair<br>
<a href="mailto:gregbair@gmail.com">gregbair@gmail.com</a><br>
______________________________________________________________________<br>
Yes, you are correct. That&#39;s what I planned on doing if I couldn&#39;t plug<br>
the equation right into matplotlib.<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 24 Sep 2010 19:58:44 +0200<br>
From: Norman Khine &lt;<a href="mailto:norman@khine.net">norman@khine.net</a>&gt;<br>
To: Python tutor &lt;<a href="mailto:tutor@python.org">tutor@python.org</a>&gt;<br>
Subject: Re: [Tutor] list.append(x) but at a specific &#39;i&#39;<br>
Message-ID:<br>
        &lt;<a href="mailto:AANLkTinq%2B%2BWr%2BN6FHtObjXs2AOOG8O1o4CK1NvUAzgts@mail.gmail.com">AANLkTinq++Wr+N6FHtObjXs2AOOG8O1o4CK1NvUAzgts@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Wed, Sep 22, 2010 at 9:47 PM, Steven D&#39;Aprano &lt;<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>&gt; wrote:<br>
&gt; On Wed, 22 Sep 2010 08:30:09 am Norman Khine wrote:<br>
&gt;<br>
&gt;&gt; hello, how do i extend a python list but from a given [i],<br>
&gt;<br>
&gt; Do you mean to modify the list in place, like append() and extend() do,<br>
&gt; or do you mean to create a new list, like + does?<br>
&gt;<br>
&gt;<br>
&gt;&gt; for example:<br>
&gt;&gt; &gt;&gt;&gt; a = [&#39;a&#39;, &#39;b&#39;, &#39;e&#39;]<br>
&gt;&gt; &gt;&gt;&gt; b = [&#39;c&#39;, &#39;d&#39;]<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; a + b<br>
&gt;&gt;<br>
&gt;&gt; [&#39;a&#39;, &#39;b&#39;, &#39;e&#39;, &#39;c&#39;, &#39;d&#39;]<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; but i want to put the items of &#39;b&#39; at [-2] for example.<br>
&gt;<br>
&gt; When you ask a question, it usually helps to show the output you *want*,<br>
&gt; not the output you *don&#39;t want*, rather than to make assumptions about<br>
&gt; what other people will understand.<br>
&gt;<br>
&gt; When you say that you want the items of b *at* -2, taken literally that<br>
&gt; could mean:<br>
&gt;<br>
&gt;&gt;&gt;&gt; a = [&#39;a&#39;, &#39;b&#39;, &#39;e&#39;]<br>
&gt;&gt;&gt;&gt; b = [&#39;c&#39;, &#39;d&#39;]<br>
&gt;&gt;&gt;&gt; a.insert(-2+1, b)<br>
&gt;&gt;&gt;&gt; print(a)<br>
&gt; [&#39;a&#39;, &#39;b&#39;, [&#39;c&#39;, &#39;d&#39;], &#39;e&#39;]<br>
&gt;<br>
&gt; Note that the items of b are kept as a single item, at the position you<br>
&gt; ask for, and the index you pass to insert() is one beyond when you want<br>
&gt; them to appear.<br>
&gt;<br>
&gt; To create a new list, instead of insert() use slicing:<br>
&gt;<br>
&gt;&gt;&gt;&gt; a[:-2+1] + [b] + a[-2+1:]<br>
&gt; [&#39;a&#39;, &#39;b&#39;, [&#39;c&#39;, &#39;d&#39;], &#39;e&#39;]<br>
&gt;<br>
&gt;<br>
&gt; If you want the items of b to *start* at -2, since there are exactly two<br>
&gt; items, extend() will do the job for in-place modification, otherwise +.<br>
&gt; But you already know that, because that was your example.<br>
&gt;<br>
&gt; If you want the items of b to *end* at -2, so that you get<br>
&gt; [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;] then you could use repeated insertions:<br>
&gt;<br>
&gt; for c in b:<br>
&gt; ? ?a.insert(-2, c)<br>
&gt;<br>
&gt; but that will likely be slow for large lists. Better to use slicing. To<br>
&gt; create a new list is just like the above, except you don&#39;t create a<br>
&gt; temporary list-of-b first:<br>
&gt;<br>
&gt;&gt;&gt;&gt; a[:-2+1] + b + a[-2+1:]<br>
&gt; [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;]<br>
&gt;<br>
&gt;<br>
&gt; To do it in place, assign to a slice:<br>
&gt;<br>
&gt;&gt;&gt;&gt; a[-2:-2] = b<br>
&gt;&gt;&gt;&gt; print(a)<br>
&gt; [&#39;a&#39;, &#39;c&#39;, &#39;d&#39;, &#39;b&#39;, &#39;e&#39;]<br>
<br>
thanks for all the replies, and the detailed information<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Steven D&#39;Aprano<br>
&gt; _______________________________________________<br>
&gt; Tutor maillist ?- ?<a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
&gt; To unsubscribe or change subscription options:<br>
&gt; <a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
?u?op ?p?sdn p,u?n? p??o? ??? ??s no? &#39;?u???? s???? ??? pu? &#39;?u??uo?<br>
?q s,??? ???<br>
%&gt;&gt;&gt; &quot;&quot;.join( [ {&#39;*&#39;:&#39;@&#39;,&#39;^&#39;:&#39;.&#39;}.get(c,None) or<br>
chr(97+(ord(c)-83)%26) for c in &quot;,adym,*)&amp;uzq^zqf&quot; ] )<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Sat, 25 Sep 2010 19:29:34 +1000<br>
From: Sayth Renshaw &lt;<a href="mailto:flebber.crue@gmail.com">flebber.crue@gmail.com</a>&gt;<br>
To: <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
Subject: [Tutor] Python And reading the Web - Javascript<br>
Message-ID:<br>
        &lt;<a href="mailto:AANLkTinM5XOc8riMeoGF6eLqg5PGxW-e4fDpEy0evg3J@mail.gmail.com">AANLkTinM5XOc8riMeoGF6eLqg5PGxW-e4fDpEy0evg3J@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Was hoping some could push me in the right direction about reading<br>
data from web pages and what modules to use. Is there support for<br>
reading if the page uses javascript?<br>
<br>
If you know any good links to tutorials for this it would be great. I<br>
was planning to use python 2.6 currently.<br>
<br>
I want to read some data from the web it will be text and numeric i<br>
was planning to export it to a database. I was thinking while I am<br>
learning maybe something simple like Sqlite or MySQL.<br>
<br>
I then want to read back data to perform sorting and some calculations on.<br>
<br>
Any ideas in general in how to do this appreciated. i don&#39;t mind<br>
reading so if you have some good links they are appreciated.<br>
<br>
Thank You<br>
<br>
Sayth<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br>
<br>
End of Tutor Digest, Vol 79, Issue 134<br>
**************************************<br>
</blockquote></div><br>