[Tutor] RE: why are these two uses different?
Stewart Midwinter
stewart at midtoad.homelinux.org
Mon Mar 1 14:56:07 EST 2004
Maybe I'm jumping into the middle of this, but why not post a more complete
portion of your code, perhaps structured as a complete python modules, to make
it easier for someone to run your code and see what the problem is? (or did you
do that already, and I missed it?).
One other comment, is it possible to split up the following line:
fcommand=self.Dict.keys()[self.Dict.values().index(hexval)]
into several components to facilitate debugging?
--
Stewart Midwinter
Calgary, Alberta
stewart 'at' midwinter 'dot' ca
Quoting "Stanfield, Vicki {D167~Indianapolis}" <vicki.stanfield at ROCHE.COM>:
> I had tried '1D'. Now I have tried to input [1D], ['1D'] but both
> generate the
>
> ValueError: list.index(x): x not in list
>
> when I hit the
> 'fcommand=self.Dict.keys()[self.Dict.values().index(hexval)]' line. It
> doesn't seem to matter how I enter the data into the wxTextEntryDialog,
> it doesn't match. Given the following dictionary excerpt:
>
> self.Dict=('\x78':'78','\x65':'65','\x60':'60',<SNIP>'\x1D':'1D')
>
> What needs to be entered into the wxTextEntryDialog to make it match
> this dictionary?
>
> --vicki
More information about the Tutor
mailing list