def matplotlib_fname():
oldname = os.path.join( os.getcwd(), '<STR_LIT>')<EOL>if os.path.exists(oldname):<EOL><INDENT>print("""<STR_LIT>""", file=sys.stderr)<EOL>shutil.move('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>home = get_home()<EOL>oldname = os.path.join( home, '<STR_LIT>')<EOL>if os.path.exists(oldname):<EOL><INDENT>configdir = get_configdir()<EOL>newname = os.path.join(configdir, '<STR_LIT>')<EOL>print("""<STR_LIT>"""%(oldname, newname), file=sys.stderr)<EOL>shutil.move(oldname, newname)<EOL><DEDENT>fname = os.path.join( os.getcwd(), '<STR_LIT>')<EOL>if os.path.exists(fname): return fname<EOL>if '<STR_LIT>' in os.environ:<EOL><INDENT>path =  os.environ['<STR_LIT>']<EOL>if os.path.exists(path):<EOL><INDENT>fname = os.path.join(path, '<STR_LIT>')<EOL>if os.path.exists(fname):<EOL><INDENT>return fname<EOL><DEDENT><DEDENT><DEDENT>fname = os.path.join(get_configdir(), '<STR_LIT>')<EOL>if os.path.exists(fname): return fname<EOL>path =  get_data_path() <EOL>fname = os.path.join(path, '<STR_LIT>')<EOL>if not os.path.exists(fname):<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL><DEDENT>return fname<EOL>
Return the path to the rc file

Search order:

 * current working dir
 * environ var MATPLOTLIBRC
 * HOME/.matplotlib/matplotlibrc
 * MATPLOTLIBDATA/matplotlibrc