Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 3bf8f74efdd94e04496b0ee1b958e061 > files > 333

drpython-3.11.1-2mdv2010.1.noarch.rpm

#drscript

#By Daniel Pozmanter
#Released under the GPL

target = ""
newtext = ""
d = wx.TextEntryDialog(DrFrame, "Replace What?:", "Replace All In Selection", "")
if d.ShowModal() == wx.ID_OK:
    target = d.GetValue()
    d = wx.TextEntryDialog(DrFrame, ("Replace " + target +  " With:"), "Replace All In Selection", "")
    if d.ShowModal() == wx.ID_OK:
        newtext = d.GetValue()
DrDocument.SetSelectedText(DrDocument.GetSelectedText().replace(target, newtext))