which

KDr2 killy.draw at gmail.com
Fri Feb 5 09:25:05 EST 2010


cmd= isinstance(cmd,str) and c.replace('${ADDR}',ip) or cmd


Best Regards,
     -- KDr2 http://kdr2.net




On Fri, Feb 5, 2010 at 10:21 PM, mk <mrkafk at gmail.com> wrote:

>
> if isinstance(cmd, str):
>    self.cmd = cmd.replace(r'${ADDR}',ip)
> else:
>    self.cmd = cmd
>
> or
>
> self.cmd = cmd
> if isinstance(cmd, str):
>    self.cmd = cmd.replace(r'${ADDR}',ip)
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100205/7e9b0bdc/attachment-0001.html>


More information about the Python-list mailing list