On Mar 25, 6:36 pm, "ianaré" <[EMAIL PROTECTED]> wrote:
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
> self.operations.insert(pos, operations.Replace.Panel(self, main))
>
> elif n == 2:
>
> self.operations.insert(pos, operations.
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
>Cameron Laird wrote:
>> In article <[EMAIL PROTECTED]>,
>> Jan Schilleman <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> try this:
>>> func = getattr(operations, ["Replace", "ChangeCase", "Move"][n])
>>>
>>> HTH,
>>> Jan
>>>
>>>
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Jan Schilleman <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> try this:
>> func = getattr(operations, ["Replace", "ChangeCase", "Move"][n])
>>
>> HTH,
>> Jan
>>
>> "ianaré" <[EMAIL PROTECTED]> schreef in bericht
>> news:[EMAIL PROTECTED]
>>> yeah t
In article <[EMAIL PROTECTED]>,
Jan Schilleman <[EMAIL PROTECTED]> wrote:
>Hi,
>
>try this:
>func = getattr(operations, ["Replace", "ChangeCase", "Move"][n])
>
>HTH,
>Jan
>
>"ianaré" <[EMAIL PROTECTED]> schreef in bericht
>news:[EMAIL PROTECTED]
>> yeah the subject doesn't really make sense does i
On Mar 25, 7:01 pm, "ianaré" <[EMAIL PROTECTED]> wrote:
> Cool now I can run it through the translator.
>
> ops = (_("Directory"), _("Replace"), _("ChangeCase"),
>_("Move"), _("Swap"), _("Insert"), _("ChangeLength"))
>
> self.operations.insert(pos, getattr(operations, ops[n]).Panel(self,
>
Cool now I can run it through the translator.
ops = (_("Directory"), _("Replace"), _("ChangeCase"),
_("Move"), _("Swap"), _("Insert"), _("ChangeLength"))
self.operations.insert(pos, getattr(operations, ops[n]).Panel(self,
main))
Thanks guys!
--
http://mail.python.org/mailman/listinfo/p
Hi,
try this:
func = getattr(operations, ["Replace", "ChangeCase", "Move"][n])
HTH,
Jan
"ianaré" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
>self.operations.insert(p
On Mar 25, 3:36 pm, "ianaré" <[EMAIL PROTECTED]> wrote:
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
> self.operations.insert(pos, operations.Replace.Panel(self, main))
>
> elif n == 2:
>
> self.operations.insert(pos, operations.
En Sun, 25 Mar 2007 19:36:26 -0300, ianaré <[EMAIL PROTECTED]> escribió:
> list = ["Replace", "ChangeCase", "Move"]
> textVariable = list[n]
> self.operations.insert(pos, operations.[textVariable].Panel(self,
> main))
>
> Is something sort of like that possible?
Try getattr:
textVariable = "Repla
ianaré wrote:
> like this:
>
>
> list = ["Replace", "ChangeCase", "Move"]
> textVariable = list[n]
> self.operations.insert(pos, operations.[textVariable].Panel(self,
> main))
>
> Is something sort of like that possible?
Yes:
self.operations.insert(
pos,
getattr(operations, tex
ianaré wrote:
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
> self.operations.insert(pos, operations.Replace.Panel(self, main))
>
> elif n == 2:
>
> self.operations.insert(pos, operations.ChangeCase.Panel(self,
> main))
>
> e
yeah the subject doesn't really make sense does it?
anyway want I want to do is this:
if n == 1:
self.operations.insert(pos, operations.Replace.Panel(self, main))
elif n == 2:
self.operations.insert(pos, operations.ChangeCase.Panel(self,
main))
elif n == 3:
self.operations.insert(
12 matches
Mail list logo