Re: How to assign a function to another function

2007-09-17 Thread Paddy
On Sep 17, 6:11 pm, Stefano Esposito <[EMAIL PROTECTED]> wrote: > On Mon, 17 Sep 2007 17:49:58 +0100 > > > > Paul Rudin <[EMAIL PROTECTED]> wrote: > > Stefano Esposito <[EMAIL PROTECTED]> writes: > > > > Hi all > > > > what i'm trying to do is this: > > > def foo (): > > > ... return None > >

Re: How to assign a function to another function

2007-09-17 Thread Stefano Esposito
On Mon, 17 Sep 2007 17:49:58 +0100 Paul Rudin <[EMAIL PROTECTED]> wrote: > Stefano Esposito <[EMAIL PROTECTED]> writes: > > > Hi all > > > > what i'm trying to do is this: > > > def foo (): > > ... return None > > ... > def bar (): > > ... print "called bar" > > ... > def assigner ():

Re: How to assign a function to another function

2007-09-17 Thread Kurt Smith
On 9/17/07, Stefano Esposito <[EMAIL PROTECTED]> wrote: > Hi all > > what i'm trying to do is this: > > >>>def foo (): > ... return None > ... > >>>def bar (): > ... print "called bar" > ... > >>>def assigner (): > ... foo = bar > ... You need to tell "assigner()" that foo doesn't belo

How to assign a function to another function

2007-09-17 Thread Stefano Esposito
Hi all what i'm trying to do is this: >>>def foo (): ... return None ... >>>def bar (): ... print "called bar" ... >>>def assigner (): ... foo = bar ... >>>assigner() >>>foo() called bar >>> This piece of code is not working and even trying with >>>def assigner (a, b): ... a = b

Re: How to assign a function to another function

2007-09-17 Thread Paul Rudin
Stefano Esposito <[EMAIL PROTECTED]> writes: > Hi all > > what i'm trying to do is this: > def foo (): > ... return None > ... def bar (): > ... print "called bar" > ... def assigner (): > ... foo = bar > ... assigner() foo() > called bar > > This piece of code is no

Re: Help please: How to assign an object name at runtime

2005-06-29 Thread Steven D'Aprano
John Machin wrote: > BTW, don't use "l". Excellent advice. But since the original poster appears to be rather a newbie, perhaps a little bit of explanation would be useful. Variables like l and I should be avoided like the plague, because in many fonts and typefaces they are indistinguishab

Re: Help please: How to assign an object name at runtime

2005-06-29 Thread John Machin
[EMAIL PROTECTED] wrote: > Good day: > Probably the answer to my question is staring me in the face, but the > solution escapes me. > > The following is the input line of the file: SoftDict-.csv: > ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14 > > I expected an instance of Machine()

Re: Help please: How to assign an object name at runtime

2005-06-29 Thread Dan Sommers
On 29 Jun 2005 17:55:44 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > The following is the input line of the file: SoftDict-.csv: > ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14 > I expected an instance of Machine() to be created with a name ca1017. > Instead, an object i

Help please: How to assign an object name at runtime

2005-06-29 Thread [EMAIL PROTECTED]
Good day: Probably the answer to my question is staring me in the face, but the solution escapes me. The following is the input line of the file: SoftDict-.csv: ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14 I expected an instance of Machine() to be created with a name ca1017. Inste

Re: How to assign

2005-01-25 Thread Laszlo Zsolt Nagy
Jan Rienyer Gadil wrote: Sort of a newbie question: How am i going to assign to a variable anything the user inputs on a wxTxtCtrl? I'm affraid you have to do it manually. I think the best solution is to use a property like this: import wx class FrameMain(wx.Frame): def __init__(self, *args

How to assign

2005-01-25 Thread Jan Rienyer Gadil
Sort of a newbie question: How am i going to assign to a variable anything the user inputs on a wxTxtCtrl? -- http://mail.python.org/mailman/listinfo/python-list