I started seting up django. the only issue I am having is that all
instructions seem to assume that I am on linux.Don't suppose there are any
good instructions for those on a windows based system.
On Sat, Sep 25, 2010 at 8:00 PM, tutor-requ...@python.org wrote:
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. Re: pure function problem (Dave Angel)
2. Re: pure function problem (Roelof Wobben)
3. Re: Plotting a Linear Equation (kb1...@aim.com)
4. Re: list.append(x) but at a specific 'i' (Norman Khine)
5. Python And reading the Web - Javascript (Sayth Renshaw)
--
Message: 1
Date: Fri, 24 Sep 2010 06:29:03 -0400
From: Dave Angel da...@ieee.org
To: Roelof Wobben rwob...@hotmail.com
Cc: tutor@python.org
Subject: Re: [Tutor] pure function problem
Message-ID: 4c9c7d6f.5080...@ieee.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 2:59 PM, Roelof Wobben wrote:
From: st...@pearwood.info
snip
On Fri, 24 Sep 2010 06:20:25 am Roelof Wobben wrote:
time =ijd()
[...]
print time(uitkomst)
Why are you calling time as a function, when it is a tijd instance?
snip
Hello Steve,
I found this in my tutorial.
13.8. Instances as return values?
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:
def find_center(box):
p =oint()
p.x =ox.corner.x + box.width/2.0
p.y =ox.corner.y - box.height/2.0
return p
To call this function, pass box as an argument and assign the result to a
variable:
center =ind_center(box)
print_point(center)
(50.0, 100.0)
So i followed it but appearently not the good way.
Roelof
There's a big difference between print_point() and print time().
print_point() in your tutorial is a function, presumably defined
someplace else.
You used print time(), (no underscore), which uses the print statement,
and tries to call a function called time().
Since you defined time as an instance of your class, and didn't do
anything special, it's not callable.
DaveA
--
Message: 2
Date: Fri, 24 Sep 2010 10:40:46 +
From: Roelof Wobben rwob...@hotmail.com
Cc: tutor@python.org
Subject: Re: [Tutor] pure function problem
Message-ID: snt118-w46627fe73899be912de70dae...@phx.gbl
Content-Type: text/plain; charset=iso-8859-1
Date: Fri, 24 Sep 2010 06:29:03 -0400
From: da...@ieee.org
To: rwob...@hotmail.com
CC: tutor@python.org
Subject: Re: [Tutor] pure function problem
On 2:59 PM, Roelof Wobben wrote:
From: st...@pearwood.info
On Fri, 24 Sep 2010 06:20:25 am Roelof Wobben wrote:
time =ijd()
[...]
print time(uitkomst)
Why are you calling time as a function, when it is a tijd instance?
Hello Steve,
I found this in my tutorial.
13.8. Instances as return values?
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:
def find_center(box):
p =oint()
p.x =ox.corner.x + box.width/2.0
p.y =ox.corner.y - box.height/2.0
return p
To call this function, pass box as an argument and assign the result to
a variable:
center =ind_center(box)
print_point(center)
(50.0, 100.0)
So i followed it but appearently not the good way.
Roelof
There's a big difference between print_point() and print time().
print_point() in your tutorial is a function, presumably defined
someplace else.
You used print time(), (no underscore), which uses the print statement,
and tries to call a function called time().
Since you defined time as an instance of your class, and didn't do
anything special, it's not callable.
DaveA
Oke,
I see it now.
I have to us a function that i had to write a few questions before.
Thanks everybody
Roelof
--
Message: 3
Date: Fri, 24 Sep 2010 12:26:31 -0400 (EDT)
From: kb1...@aim.com
To: tutor@python.org
Subject: Re: [Tutor] Plotting a Linear Equation
Message-ID: 8cd2a1c6185afcf-854-...@webmail-m060.sysops.aol.com
Content-Type: text/plain; charset=utf-8; format=flowed
-Original Message-
From: Greg gregb...@gmail.com
To: tutor tutor@python.org