[Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-14 Thread Tamar Osher
Hello! I have finished reading some Python tutorials. My favorite tutorial is the official tutorial at Python.org. I am hoping to find a professionally designed, serious, university level book (with exercises, with a learning disc, and answers, and an elaborately helpful website) that will

Re: [Tutor] Learn Python The Hard Way, Ex19-3

2012-02-14 Thread amt
Hello! I managed in the end to have more than 10 ways of doing it, moving now to Exercise 20. Thank you so much for helping me out every time. Regards, amt ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] Using __ini__.py for common fonctions

2012-02-14 Thread Karim
Le 14/02/2012 20:25, Alan Gauld a écrit : On 14/02/12 19:08, Karim wrote: Advices are welcome! Asking the same question twice does not double your chances of getting a reply. It may even reduce them. As to your question, it's not the most common way to do it, it's not even the way I'd r

Re: [Tutor] Using __ini__.py for common fonctions

2012-02-14 Thread Alan Gauld
On 14/02/12 19:08, Karim wrote: Advices are welcome! Asking the same question twice does not double your chances of getting a reply. It may even reduce them. As to your question, it's not the most common way to do it, it's not even the way I'd recommend since what it does is hide your code

[Tutor] Using __ini__.py for common fonctions

2012-02-14 Thread Karim
Hello All, I have 3 functions, common utilities which I use several times in many modules of a main package. I don't want to create an utilies.py module in the package. Instead I declare it in the __init__.py of the package. Then to use it I do the following: from packe Is it ok to do thi

[Tutor] Using __ini__.py for common fonctions

2012-02-14 Thread Karim
Hello All, I have 3 functions, common utilities which I use several times in many modules of a main package. I don't want to create an utilies.py module in the package. Instead I declare it in the __init__.py of the package. Then to use it inside my package I do the following: from package

Re: [Tutor] problem in plotting circular plates at regular separation

2012-02-14 Thread Mark Lawrence
On 14/02/2012 14:07, Alan Gauld wrote: On 14/02/12 13:56, Debashish Saha wrote: for r in range (1,5): ... z=r mlab.mesh(x, y,z, colormap='Greens') ... AssertionError: Array z must be 2 dimensional. And your question is? It's implied, please do my work for me because I can't be bothere

Re: [Tutor] problem in ploting cylinders with different colour.

2012-02-14 Thread Steven D'Aprano
Debashish Saha wrote: TypeError: grid_source() takes exactly 3 arguments (4 given) Is this error not clear enough? The function expects 3 arguments, you have given it 4. You need to give one fewer. The only tricky thing to remember is that when you have a method, one argument is the autom

Re: [Tutor] problem in plotting circular plates at regular separation

2012-02-14 Thread Alan Gauld
On 14/02/12 13:56, Debashish Saha wrote: for r in range (1,5): ... z=r mlab.mesh(x, y,z, colormap='Greens') ... AssertionError: Array z must be 2 dimensional. And your question is? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ _

[Tutor] problem in plotting circular plates at regular separation

2012-02-14 Thread Debashish Saha
from __future__ import division import numpy from enthought.mayavi import mlab for r in range (1,5): print r pi = numpy.pi cos = numpy.cos sin = numpy.sin dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01 [s,theta]=numpy.mgrid[0.01:r+0.015:.01,0:2*pi+dtheta*1.5:dtheta] x=s*co

[Tutor] problem in ploting cylinders with different colour.

2012-02-14 Thread Debashish Saha
import numpy from enthought.mayavi import mlab #def test_mesh(): #"""A very pretty picture of spherical harmonics translated from #the octaviz example.""" for r in range (1,5): print r pi = numpy.pi cos = numpy.cos sin = numpy.sin dphi, dtheta, dz = pi/250.0, pi/250.0, 0