()
| 659 | """ |
| 660 | |
| 661 | def gen_candidates(): |
| 662 | # rely on down-stream code to make absolute. This protects us |
| 663 | # from having to directly get the current working directory |
| 664 | # which can fail if the user has ended up with a cwd that is |
| 665 | # non-existent. |
| 666 | yield 'matplotlibrc' |
| 667 | try: |
| 668 | matplotlibrc = os.environ['MATPLOTLIBRC'] |
| 669 | except KeyError: |
| 670 | pass |
| 671 | else: |
| 672 | yield matplotlibrc |
| 673 | yield os.path.join(matplotlibrc, 'matplotlibrc') |
| 674 | yield os.path.join(get_configdir(), 'matplotlibrc') |
| 675 | yield os.path.join(get_data_path(), 'matplotlibrc') |
| 676 | |
| 677 | for fname in gen_candidates(): |
| 678 | if os.path.exists(fname) and not os.path.isdir(fname): |
no test coverage detected
searching dependent graphs…