Re: [Tutor] Problem with calling class methods stored in a list

2013-01-11 Thread Peter Otten
Tobias M. wrote: > Am 10.01.2013 15:15, schrieb Peter Otten: >> Of course handle_1_42() is not exactly the method name one would hope >> for. You could, again, strive for simplicity and add a lookup table that >> maps protocol tuples to function /names/ , but as simplicity doesn't seem >> to be yo

[Tutor] OT: brainf**k program

2013-01-11 Thread Albert-Jan Roskam
Not quite PEP8 compliant, but quite nifty: http://www.cs.princeton.edu/~ynaamad/misc/bf.htm The program below interprets the follwing string as "Hello World": ++[>+++>++>+++>+-]>++.>+.+++..+++.>++.<<+++.>.+++.--..>+.>.   (lambda t:(lambda a:(la

[Tutor] Books for Learning Python

2013-01-11 Thread Chris Rogers
Hello all, I've began my journey into Python (2.7 currently) and I'm finding it a bit rough using the python.org tutorials. Although chalked full of information I find it a bit overwhelming. Can anyone recommend a book, or two, or three that would be great material for really learning the languag

Re: [Tutor] Books for Learning Python

2013-01-11 Thread Femi Banjo
Not Books but have you tried any of the online learning courses? They're free and look very good from my equally beginner perspective as I struggle through them(allow more time than you think :[ ) www.coursera.org www.edx.org www.udacity.com all very good, take you pick! From: quent...@gmail.co

Re: [Tutor] Books for Learning Python

2013-01-11 Thread jh
There is also this - http://www.codecademy.com/#!/exercises/0 From: Tutor [mailto:tutor-bounces+xperimental22=gmail@python.org] On Behalf Of Chris Rogers Sent: Friday, January 11, 2013 9:11 AM To: tutor@python.org Subject: [Tutor] Books for Learning Python Hello all, I've began my jo

Re: [Tutor] Books for Learning Python

2013-01-11 Thread Alan Gauld
On 11/01/13 14:10, Chris Rogers wrote: Hello all, I've began my journey into Python (2.7 currently) and I'm finding it a bit rough using the python.org tutorials. You don't tell us your starting point. Are you experienced in programming in other languages or is python your

[Tutor] help for a beginner

2013-01-11 Thread MDB
Hi, I am a beginner to progrmming and want to learn basic python. I am a scientist (with less math background) with absolutely no programming experience. Are there any web based tutorials/videos/books to learn python. Any help is deeply appreciated, thanks Murail -- Murali Dharan Bashyam, PhD, MN

Re: [Tutor] help for a beginner

2013-01-11 Thread vishwajeet singh
On Sat, Jan 12, 2013 at 12:28 AM, MDB wrote: > Hi, > I am a beginner to progrmming and want to learn basic python. I am a > scientist (with less math background) with absolutely no programming > experience. Are there any web based tutorials/videos/books to learn python. > The best book for begin

Re: [Tutor] help for a beginner

2013-01-11 Thread Graham Dubow
Murail, Check out Udacity.com and the CS101 course. Great video lectures reinforced by "homework" and problems (with answers) that you can do yourself. Also has a very good forum and active user base to ask questions. It is a good starting point for a beginner and teaches the basics behind how to

Re: [Tutor] garbage collection/class question

2013-01-11 Thread Jan Riechers
On 10.01.2013 19:50, Mitya Sirenef wrote: On 01/10/2013 09:06 AM, richard kappler wrote: class Tree(object): height = 0 def grow(self): self.height += 1 You may have a dozen of related functions and you can logically group them together by making them methods of a class, mak

Re: [Tutor] Books for Learning Python

2013-01-11 Thread Gary L. Gray
On Jan 11, 2013, at 1:39 PM, Alan Gauld wrote: > On 11/01/13 14:10, Chris Rogers wrote: >> Hello all, I've began my journey into Python (2.7 currently) and I'm >> finding it a bit rough using the python.org >> tutorials. > > You don't tell us your starting point. > > Are you

Re: [Tutor] garbage collection/class question

2013-01-11 Thread Dave Angel
On 01/11/2013 02:41 PM, Jan Riechers wrote: > On 10.01.2013 19:50, Mitya Sirenef wrote: >> On 01/10/2013 09:06 AM, richard kappler wrote: >> >> class Tree(object): >> height = 0 >> >> def grow(self): >> self.height += 1 >> >> You may have a dozen of related functions and you can

[Tutor] Binary/Decimal convertor

2013-01-11 Thread Ghadir Ghasemi
Hi, I made a program called binary/denary convertor. Can anyone tell me about how I could stop the user entering a binary number with more than 8 numbers or 8 bit by repeating the question over and over until they do enter a correct binary number( 8-bit or less) Here is the code. I started off b

Re: [Tutor] Books for Learning Python

2013-01-11 Thread lconrad
on line Python courses with labs google "python the hard way" udemy.com also has python courses https://developers.google.com/edu/python/ http://www.codecademy.com/tracks/python google "free online python programming classes courses" Len On Friday 11/01/2013 at 3:18 pm, Gary L. Gray

Re: [Tutor] Binary/Decimal convertor

2013-01-11 Thread David Rock
* Ghadir Ghasemi [2013-01-11 21:51]: > Hi, I made a program called binary/denary convertor. Can anyone tell > me about how I could stop the user entering a binary number with more > than 8 numbers or 8 bit by repeating the question over and over until > they do enter a correct binary number( 8-bit

Re: [Tutor] Binary/Decimal convertor

2013-01-11 Thread Dave Angel
On 01/11/2013 04:51 PM, Ghadir Ghasemi wrote: > Hi, I made a program called binary/denary convertor. Can anyone tell me about > how I could stop the user entering a binary number with more than 8 numbers > or 8 bit by repeating the question over and over until they do enter a > correct binary nu

Re: [Tutor] garbage collection/class question

2013-01-11 Thread Alan Gauld
On 11/01/13 19:41, Jan Riechers wrote: class Tree(object): height = 0 def grow(self): self.height += 1 Actually one question about those "dozens of related" instances generated by: greenwoodTree = Tree() oakTree = Tree() Both, greenwoodTree and oakTree, are derived f

[Tutor] Working with output of a subprocess

2013-01-11 Thread 3n2 Solutions
Hello, Need some help with working with a text file. Is it possible to get the values associated with each of the parameter in the below text file format? For example: 1. How can I check what the Min and Max values are? 2. How to check the second column value associated with "epoch2"? Your help

Re: [Tutor] Books for Learning Python

2013-01-11 Thread ALAN GAULD
> I did a lot of programming in Fortran 77 while working on my Ph.D. in > engineering mechanics > >That's OK, it's not permanent damage. :-) > >> (1) Will Python allow me to create applications that provide a simple GUI >> interface to something like an integrator for ODEs? > >No idea what an

Re: [Tutor] Books for Learning Python

2013-01-11 Thread Francois Dion
On Fri, Jan 11, 2013 at 3:14 PM, Gary L. Gray wrote: > On Jan 11, 2013, at 1:39 PM, Alan Gauld wrote: > (1) Will Python allow me to create applications that provide a simple GUI > interface to something like an integrator for ODEs? Does it have graphics > libraries that allow one to animate the

Re: [Tutor] Working with output of a subprocess

2013-01-11 Thread Dave Angel
On 01/11/2013 05:29 PM, 3n2 Solutions wrote: > Hello, > > Need some help with working with a text file. > Is it possible to get the values associated with each of the parameter in > the below text file format? For example: There are no intrinsic parameters and values in a text file. it's free for

Re: [Tutor] pexports python27.dll > python27.def (pygraphviz 1.1 package )

2013-01-11 Thread somnath chakrabarti
Actually the problem was the access permission for the destination folder. I changed to my account-specific path and it worked. Thanks Somnath On Fri, Jan 11, 2013 at 7:08 PM, Prasad, Ramit wrote: > somnath chakrabarti wrote: > > I have mingw and python 2.7 in a Windows 7 box and trying to ins

Re: [Tutor] garbage collection/class question

2013-01-11 Thread Mitya Sirenef
On 01/11/2013 02:41 PM, Jan Riechers wrote: On 10.01.2013 19:50, Mitya Sirenef wrote: >> On 01/10/2013 09:06 AM, richard kappler wrote: >> >> class Tree(object): >> height = 0 >> >> def grow(self): >> self.height += 1 >> >> You may have a dozen of related functions and you can logically group >

Re: [Tutor] writing effective unittests

2013-01-11 Thread Prasad, Ramit
Japhy Bartlett wrote: > TDD is a good principle but usually seems a little too pedantic for real > world programming.  Where tests (in my > experience) get really useful is in making sure that a new change hasn't > unexpectedly broken something already > written. > I would argue that TDD is a p

Re: [Tutor] garbage collection/class question

2013-01-11 Thread Mitya Sirenef
On 01/11/2013 04:32 PM, Dave Angel wrote: On 01/11/2013 02:41 PM, Jan Riechers wrote: >> On 10.01.2013 19:50, Mitya Sirenef wrote: >>> On 01/10/2013 09:06 AM, richard kappler wrote: >>> >>> class Tree(object): >>> height = 0 >>> >>> def grow(self): >>> self.height += 1 >>> >>> You may have a do

Re: [Tutor] run perl script files and capture results

2013-01-11 Thread Prasad, Ramit
eryksun wrote: [snip] > 1. Using a forward slash in paths is OK for DOS/Windows system calls > (e.g. opening a file or setting the cwd of a new process), dating back > to the file system calls in MS-DOS 2.0 (1983). Otherwise a backslash > is usually required (e.g. shell commands and paths in comman

Re: [Tutor] pexports python27.dll > python27.def (pygraphviz 1.1 package )

2013-01-11 Thread Prasad, Ramit
somnath chakrabarti wrote: >  I have mingw and python 2.7 in a Windows 7 box and trying to install > PyGraphViz-1.1 using the following CLI > utility > > python setup.py install build --compiler=mingw32 > However, it ends up compiling error with undefined references as follows: > > ... > build\t

Re: [Tutor] pexports python27.dll > python27.def (pygraphviz 1.1 package )

2013-01-11 Thread Prasad, Ramit
somnath chakrabarti wrote: > Actually I embedded a link to the refer site from where I have been following > the procedure. I am new to Python > too and have been following the book "Mining the Social Web" by Matthew > Russell and thought Tutor mailing list > would be the right place to post the

Re: [Tutor] Binary/Decimal convertor

2013-01-11 Thread Alan Gauld
On 11/01/13 21:51, Ghadir Ghasemi wrote: Hi, I made a program called binary/denary convertor. Can anyone tell me about how I could stop the user entering a binary > number with more than 8 numbers or 8 bit Why would you want to? Your code can handle much bigger binary numbers, why limit the

Re: [Tutor] Working with output of a subprocess

2013-01-11 Thread Alan Gauld
On 11/01/13 22:29, 3n2 Solutions wrote: Need some help with working with a text file. Is it possible to get the values associated with each of the parameter in the below text file format? For example: Yes, but it's non trivial. You need to parse the text. 1. How can I check what the Min and

[Tutor] a Pygtk question sort of

2013-01-11 Thread richard kappler
Before anybody jumps me about this question being inappropriate for this list, yes, I know it probably is BUT, the two places where it might be appropriate are down pretty hard, so this is my only option (I think). The question is in regards to pygtk I think, and pocketsphinx obliquely. Appended b

Re: [Tutor] a Pygtk question sort of

2013-01-11 Thread Alan Gauld
On 12/01/13 01:18, richard kappler wrote: Before anybody jumps me about this question being inappropriate for this list, yes, I know it probably is BUT, the two places where it might be appropriate are down pretty hard, so this is my only option (I think). I'm not sure what you mean by "down pr

Re: [Tutor] run perl script files and capture results

2013-01-11 Thread Dave Angel
On 01/11/2013 07:33 PM, Prasad, Ramit wrote: > [snip] > Why not just use r'C:\Python27\\'? Might be too confusing for > a beginner to remember, I suppose. > > Because that'd have two trailing backslashes. (in Python 2.7 anyway) -- DaveA ___ Tutor m

[Tutor] Is a link broken?

2013-01-11 Thread Ed Owens
I'm still working through Chun's "Core Python Applications". I got the web crawler (Example 9-2) working after I found a ':' typing error. Now I'm trying to convert that to a program that checks for broken links. This is not in the book. The problem I'm having now is knowing whether a link