Return Values & lambda

Benjamin Kaplan benjamin.kaplan at
Mon Feb 21 20:10:36 CET 2011

On Mon, Feb 21, 2011 at 1:59 PM, pradeepbpin <pradeepbpin at> wrote:
> I have a main program module that invokes an input dialog box via  a
> menu item. Now, the code for drawing and processing the input of
> dialog box is in another module, say ''. I connect the menu
> item to this dialog box by a statement like,
> manu_item.connect('activate', lambda a: dialogs.open_dilaog())
> If this function open_dialog() returns a list of dialog inputs values,
> how can I access those values in the main module ?

You can't. The event handler just calls a method. It's expected that
you'll do everything you need in that. Make your own method for the
menu item that starts off by creating the dialog and then handles the

> --

More information about the Python-list mailing list