lib/matplotlib/config/cutils.py
def is_writable_dir(p):
    """
    p is a string pointing to a putative writable dir -- return True p
    is such a string, else False
    """
    try: p + ''  # test is string like
    except TypeError: return False
    try:
        t = tempfile.TemporaryFile(dir=p)
        t.write('1')
        t.close()
    except OSError: return False
    else: return True

    p is a string pointing to a putative writable dir -- return True p
    is such a string, else False
    
p is a string pointing to a putative writable dir -- return True p
is such a string, else False
p is a string pointing to a putative writable dir -- return True p is such a string else False
def is_writable_dir(p):
    try: p + ''  
    except TypeError: return False
    try:
        t = tempfile.TemporaryFile(dir=p)
        t.write('1')
        t.close()
    except OSError: return False
    else: return True
def is_writable_dir ( p ) : try : p + '' except TypeError : return False try : t = tempfile . TemporaryFile ( dir = p ) t . write ( '1' ) t . close ( ) except OSError : return False else : return True
p is a string pointing to a putative writable dir -- return True p
is such a string, else False
p is a string pointing to a putative writable dir -- return True p is such a string else False
"""
    p is a string pointing to a putative writable dir -- return True p
    is such a string, else False
    """ # test is string like
p