import re


def convertd2e (numberstring=" "):
    """
    def convertd2e (numberstring):

        takes a string and replaces all d's or D's with e's.
        usefule for reading data files with doubles output by 
        Fortran, which uses d, or D instead of e, for the exponent.
    """
    Dd=re.compile("[Dd]")
    newstring=Dd.sub("e",numberstring)
    return newstring
    # end convertd2e ==================================================