matplotlib ignoring .matplotlibrc?

It works great now. Thanks for the quick response and
the fix John!

Also to answer Todd Miller:

I googled around on this and got a suggestion having
to do with mainloop
handling from an old Guido e-mail. IDLE has a -n
switch ...

In my initial message note the IDLE info:

IDLE 1.0 ==== No Subprocess ====

The 'No Subprocess' part indicates I'm using the -n
flag. In IDLE 1.0, from my understanding, the IDE
normally restarts the interpreter each time a program
is run. The -n flag does not do this and runs
everything together so the Tkinter mainloop does not
get confused. It's not a great solution but it works
and I have not had serious stability problems, at
least for my limited needs. This trick is needed for
the turtle module, and probably anything that uses

And now back to trying matplotlib!

-- David

     > Ahh the golden piece of information. Todd
Miller has
     > reported that idle does not seem to respect
     > At this point we have no idea why. We'll
try to get this
     > figured out ASAP!

>>>> "John" == John Hunter <jdhunter@...134...> writes:

I found one problem. IDLE sets the HOME variable,
and there is a bug
in the way matplotlib located the rc file.
Basically, if HOME is set,
it expects the rc file to be there. Here is a fix.

and replace

the function matplotlib_fname with the following

def matplotlib_fname():
     'Return the path to the rc file'
     if os.environ.has_key('MATPLOTLIBRC'):
         path = os.environ['MATPLOTLIBRC']
         if os.path.exists(path):
             fname = os.path.join(path,
             if os.path.exists(fname):
                 return fname

     if os.environ.has_key('HOME'):
         path = os.environ['HOME']
         if os.path.exists(path):
             fname = os.path.join(path,
             if os.path.exists(fname):
                 return fname

     path = get_data_path() # guaranteed to exist or
     fname = os.path.join(path, '.matplotlibrc')
     if not os.path.exists(fname):
         print >> sys.stderr, 'Could not find
.matplotlibrc; using defaults'
     return fname


I tested this on windows with idle. Idle now
respects matplotlibrc
and loads TkAgg. However, at least on my system,
there is still some
idle bug because the Tk window launches and then
freezes without
displaying the figure I suspect Todd, the TkAgg
author, will be
looking at this soon. [Todd, I had this problem
with or without
window_focus set in my test].

>Sorry for the troubles,

Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway