gstlal 1.13.0
Loading...
Searching...
No Matches
__init__.py
1# Copyright (C) 2013-2016 Kipp Cannon
2# Copyright (C) 2015 Chad Hanna
3# Copyright (C) 2023 Cort Posnansky
4#
5# This program is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License as published by the
7# Free Software Foundation; either version 2 of the License, or (at your
8# option) any later version.
9#
10# This program is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13# Public License for more details.
14#
15# You should have received a copy of the GNU General Public License along
16# with this program; if not, write to the Free Software Foundation, Inc.,
17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19
20import os
21
22
23def set_matplotlib_cache_directory():
24 """
25 Change the matplotlib cache directory to a local temporary location.
26 """
27 #FIXME A cleaner solution would be to set MPLCONFIGDIR in the condor
28 # submit file, but doing so is either nontrivial or unsupported.
29 if os.getenv("_CONDOR_SCRATCH_DIR"):
30 os.environ['MPLCONFIGDIR'] = os.getenv("_CONDOR_SCRATCH_DIR")
31