[snip]
> Last August [1], I offered this alternative:
>
> self.cmd = (cmd.replace(r'${ADDR}',ip)
> if isinstance(cmd, str) else
> cmd)
>
> But it didn't get much love in this forum!
I'd probably go for that one as well though I might consider removing
the outer parentheses.
--
Gerald Britton