Re: [Tutor] Dynamic Function Calls

2009-08-14 Thread Megan Land
All three methods are defined below the snippet I provided. def func(): code... def func0(): do stuff def func1(): do stuff def func2(): do stuff Megan Land FVT Blade EMET Test Engineer ml...@us.ibm.com Fr

[Tutor] rationale for nested classes?

2009-08-14 Thread Serdar Tumgoren
Hi everyone, I was wondering if there's anyone who can offer a use case/rationale for nested class? For, instance, in the following example (taken from here: http://www.brpreiss.com/books/opus7/html/page598.html): class A(object): def __init__(self): self.y = 0 class B(object):

Re: [Tutor] rationale for nested classes?

2009-08-14 Thread Serdar Tumgoren
2009/8/14 Geneviève DIAGORN : > Bonjour, > Je suis absente jusqu'au 02/09 inclus. > Good to know. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Dynamic Function Calls

2009-08-14 Thread bob gailer
Megan Land wrote: All three methods are defined below the snippet I provided. In Python names must be defined before they are referenced. Put these defs above the snippet. def func(): code... def func0(): do stuff def func1(): do stuff def func2(): do stuff Megan Land FVT Blade EMET Tes

[Tutor] awk, test

2009-08-14 Thread Vincent Wan
Hi Todd, Did you get your searches running? Have you had a chance to look at my exam? Are you planning to go next door for beer some day next week? If so, do you know when. I'd like to stop by and chat. Best, Vincent --

Re: [Tutor] rationale for nested classes?

2009-08-14 Thread bob gailer
Serdar Tumgoren wrote: Hi everyone, I was wondering if there's anyone who can offer a use case/rationale for nested class? In my Python Pipelines program I have: class Count: ... class Counter: ... When an instance of Count is created, one or more instances of Counter are created, b

Re: [Tutor] rationale for nested classes?

2009-08-14 Thread Alan Gauld
"Serdar Tumgoren" wrote I was wondering if there's anyone who can offer a use case/rationale for nested class? It provides another level of name hiding but personally I don;t think there is much benefit. If you keep the related classses in the same module that should be good enough IMHO. But

Re: [Tutor] Dynamic Function Calls

2009-08-14 Thread Dave Angel
bob gailer wrote: Megan Land wrote: All three methods are defined below the snippet I provided. In Python names must be defined before they are referenced. Put these defs above the snippet. def func(): code... def func0(): do stuff def func1(): do stuff def func2(): do stuff Megan Land

Re: [Tutor] Dynamic Function Calls

2009-08-14 Thread Megan Land
From: Dave Angel To: bob gailer

Re: [Tutor] rationale for nested classes?

2009-08-14 Thread Serdar Tumgoren
Okay, those explanations definitely help. I thought I had run into a situation where nested classes might be called for, but I think plain-old inheritance is really what I'm after. Many thanks! ___ Tutor maillist - Tutor@python.org http://mail.python.o

[Tutor] calculate values of raster from vector

2009-08-14 Thread questions anon
Is there a way I could read in a raster image, read in a shapefile image and then calculate the mean and standard deviation of the raster values within the shapefile? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] [PyQt4] Parent problems with QThread and QProgressDialog

2009-08-14 Thread PyProg PyProg
Hi All, Benefiting from this excellent ticket: http://snippets.prendreuncafe.com/snippets/tagged/pyqt/order_by/date ... I can implement the behavior that I want and with QThread QProgressDialog (knowing that the progress bar updates whenever a new file is processed) in my application. Neverthele

Re: [Tutor] Dynamic Function Calls

2009-08-14 Thread Dave Angel
Megan Land wrote: From: Dave Angel

Re: [Tutor] write program to extract data

2009-08-14 Thread Dave Angel
Michael Miesner wrote: Hi- I work in a research lab and part of the lab I'm not usually associated with uses a program that outputs data in a .txt file for each participant that is run. The participant # is the title of the text document (ie E00343456.txt) style and I'd like to be able to take th

Re: [Tutor] write program to extract data

2009-08-14 Thread Wayne
Whoops, I forgot the reply-all. On Fri, Aug 14, 2009 at 3:03 PM, Michael Miesner wrote: > That is one distinct advantage, It'll always be just like that. However, I > dont know where to even begin; I dont know what command pulls text out > ($string?) or how to import it into a spreadsheet. > Ala

Re: [Tutor] Dynamic Function Calls

2009-08-14 Thread Megan Land
Dave Angel wrote on 08/14/2009 03:53:30 PM: > From: > > Dave Angel > > To: > > Megan Land/Raleigh/Contr/i...@ibmus > > Cc: > > bob gailer , tutor@python.org > > Date: > > 08/14/2009 03:53 PM > > Subject: > > Re: [Tutor] Dynamic Function Calls > > Megan Land wrote: > > > > From: Dave An

Re: [Tutor] Tutor Digest, Vol 66, Issue 38

2009-08-14 Thread Garry Bettle
Howdy all, Hope this email finds you all well - roll on the weekend. I've been tasked with replicating an Excel spreadsheet. The spreadsheet contains cells that use Excels' NORMDIST() function. I have all 3 variables required - value, mean and standard deviation - but does anyone already have e

[Tutor] Normal Distribution

2009-08-14 Thread Garry Bettle
Sorry! Now with an appropriate subject line... G. Howdy all, Hope this email finds you all well - roll on the weekend. I've been tasked with replicating an Excel spreadsheet. The spreadsheet contains cells that use Excels' NORMDIST() function. I have all 3 variables required - value, mean and

Re: [Tutor] Dynamic Function Calls

2009-08-14 Thread Dave Angel
Megan Land wrote: I tried what you said. I can call the function by itself (not within the dictionary). I also printed the help(__name__). All of my functions were listed. Here's a more representative example of my code (I doing this for work so I don't want to give my entire program away):