Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Philip Semanchuk
On Nov 8, 2010, at 9:51 AM, Ryan May wrote: > On Mon, Nov 8, 2010 at 8:34 AM, Philip Semanchuk wrote: >> Hi Ryan, >> Thanks. I don't know why sudo behaves the way it does with regard to $HOME, >> but the behavior of sudo is not under my control (nor matplotlib's). Also, I >> expect that *lots*

Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Ryan May
On Mon, Nov 8, 2010 at 8:34 AM, Philip Semanchuk wrote: > Hi Ryan, > Thanks. I don't know why sudo behaves the way it does with regard to $HOME, > but the behavior of sudo is not under my control (nor matplotlib's). Also, I > expect that *lots* of software depends on this behavior of sudo so cha

Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Philip Semanchuk
On Nov 8, 2010, at 9:13 AM, Ryan May wrote: > On Thu, Nov 4, 2010 at 10:49 AM, Philip Semanchuk > wrote: >> Hi all, >> I've run into an aspect of matplotlib's setup that seems awkward. I'm seeing >> this on Ubuntu, but I imagine it would happen on any *nix platform. >> >> If python is running

Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Ryan May
On Thu, Nov 4, 2010 at 10:49 AM, Philip Semanchuk wrote: > Hi all, > I've run into an aspect of matplotlib's setup that seems awkward. I'm seeing > this on Ubuntu, but I imagine it would happen on any *nix platform. > > If python is running under sudo the first time matplotlib is imported, then

Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Matthieu Huin
If you don't have any special use for the config dir, this might be a more straightforward solution that doesn't require patching matplotlib. Simply paste this in your code, before importing matplotlib : import os os.environ['HOME'] = '/tmp/' Might be safer to use 'MPLCONFIGDIR' instead of 'HO

[Matplotlib-users] config dir owned by root

2010-11-07 Thread Philip Semanchuk
Hi all, I've run into an aspect of matplotlib's setup that seems awkward. I'm seeing this on Ubuntu, but I imagine it would happen on any *nix platform. If python is running under sudo the first time matplotlib is imported, then matplotlib creates its config dir (~/.matplotlib) with root as the