Re: [Tutor] Plotting a Linear Equation

2011-04-21 Thread Alan Gauld
"Emanuel Woiski" wrote easy: I love your sense of humour! import pylab as pl import numpy as np x1,x2,n,m,b = 0.,10.,11,2.,5. x = np.r_[x1:x2:n*1j] pl.plot(x,m*x + b); pl.grid(); pl.show() Now, given this is a list for beginners to Python, could you try explaining what you did there and h

Re: [Tutor] learnpython.org - Free Interactive Python Tutorial

2011-04-21 Thread Ron Reiter
For those of you who didn't notice the title, here is the link: www.learnpython.org Also, please note that there is still not enough content to actually learn from the website yet. I am hoping people will help me with writing tutorials so the site will be useful as soon as possible. On Wed, Apr 2

Re: [Tutor] Jokes on Python Language

2011-04-21 Thread Marc Tompkins
On Thu, Apr 21, 2011 at 4:49 AM, Ratna Banjara wrote: > Hello all, > > Does anybody knows jokes related to Python Language? > If the answer is yes, please do share it... > Of course, there's the AWESOME webcomic xkcd (www.xkcd.com) which is excellent reading even when he's not talking about Pyth

Re: [Tutor] Plotting a Linear Equation

2011-04-21 Thread Emanuel Woiski
easy: import pylab as pl import numpy as np x1,x2,n,m,b = 0.,10.,11,2.,5. x = np.r_[x1:x2:n*1j] pl.plot(x,m*x + b); pl.grid(); pl.show() regards woiski 2011/4/21 ifancy > I want to use matplotlib (or similar) to plot an equation in > (y=mx+b) or standard form (Ax + By = C). I could make >

Re: [Tutor] Jokes on Python Language

2011-04-21 Thread Peter Otten
Ratna Banjara wrote: > Does anybody knows jokes related to Python Language? > If the answer is yes, please do share it... import antigravity http://entrian.com/goto/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] Plotting a Linear Equation

2011-04-21 Thread ifancy
I want to use matplotlib (or similar) to plot an equation in (y=mx+b) or standard form (Ax + By = C). I could make two points out of those manually, but I was wondering if anyone knew of an easier way. Thanks. ___ Tutor maillist - Tutor@pyth

Re: [Tutor] Jokes on Python Language

2011-04-21 Thread Marc Tompkins
On Thu, Apr 21, 2011 at 4:49 AM, Ratna Banjara wrote: > Hello all, > > Does anybody knows jokes related to Python Language? > If the answer is yes, please do share it... > > It's not exactly a joke, but what you'll see if you accidentally go to python.com instead of python.org is... funny. __

Re: [Tutor] learnpython.org - Free Interactive Python Tutorial

2011-04-21 Thread Brett Ritter
On Thu, Apr 21, 2011 at 10:23 AM, Greg Werner wrote: > Hi Ron may you share the link? I have been using another fun one: > www.pyschools.com, although I would love to have another option. On 20/04/2011, at 20:20, tee chwee liong wrote: > this is great for beginners like me. Could you pls provid

Re: [Tutor] learnpython.org - Free Interactive Python Tutorial

2011-04-21 Thread Greg Werner
Hi Ron may you share the link? I have been using another fun one: www.pyschools.com, although I would love to have another option. Greg On 20/04/2011, at 20:20, tee chwee liong wrote: > hi Ron, > > this is great for beginners like me. Could you pls provide the link. tq > > Date: Wed, 20

Re: [Tutor] Jokes on Python Language

2011-04-21 Thread Stefan Behnel
Ratna Banjara, 21.04.2011 13:49: Does anybody knows jokes related to Python Language? If the answer is yes, please do share it... http://www.python.org/doc/humor/ Stefan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription o

[Tutor] Jokes on Python Language

2011-04-21 Thread Ratna Banjara
Hello all, Does anybody knows jokes related to Python Language? If the answer is yes, please do share it... -- Regards, Ratna P Banjara www.rat32.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.pyt

Re: [Tutor] jenia. cannot install mysqldb

2011-04-21 Thread Alan Gauld
"ivlev jenia" wrote I'm trying to run the "python manage.py sql hello" command where polls is the name of my application. I'm getting this error: _mysql_exceptions.OperationalError: (1049, "Unknown database 'c:\\wamp\\www\\helloworld5\\hello\\mysql.db'") Whilst there are Django and MySql u

Re: [Tutor] list.__init__ within class definition

2011-04-21 Thread Alan Gauld
"Alex Companioni" wrote class Tomato(list): def __init__(self, data): list.__init__(self, data) The list.__init__ method (if it is a method, I'm not clear on what __init__ actually *is*) creates a list, right? Not quite. __init__ (which is a method) is an initialiser not a const

Re: [Tutor] jenia. cannot install mysqldb

2011-04-21 Thread Raúl Cumplido
Maybe that's a stupid question but, have you tried to connect directly to your MySQL database without the django app? I mean using a MySQL admin or something. Have you created the mysql.db schema? The erros says clearly it doesn't knows the database your trying to connect. Is your root user ok? I

Re: [Tutor] list.__init__ within class definition

2011-04-21 Thread Alan Gauld
"James Mills" wrote What you actually want is this: class Tomato(list): ... def __init__(self, data): ... super(Tomato, self).__init__(data) ... l = Tomato([1, 2, 3]) l [1, 2, 3] Your example: class Tomato(list): ... def __init__(self, data): ... list

Re: [Tutor] python timers

2011-04-21 Thread Alan Gauld
"michael scott" wrote As I was messing around with it I found a way to measure time... but I'm positive there is a more elegant way to deal with this than what I've thrown together. def thing(): start = time.time() while 1: now = time.time() if now == start + 10.0:

Re: [Tutor] jenia. cannot install mysqldb

2011-04-21 Thread ivlev jenia
Hello. I finally was able to install mysqldb, the python library to interact with mysql database. I'm trying to run the "python manage.py sql hello" command where polls is the name of my application. I'm getting this error: _mysql_exceptions.OperationalError: (1049, "Unknown database 'c:\\wa