Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 560ff335335f90eb5b9858b6748cc798 > files > 337

drpython-3.11.0-3mdv2009.1.noarch.rpm

#drscript
#Updated to new namespace.

#By Daniel Pozmanter
#Released under the GPL

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