@undoc
def softspace(file, newvalue):
    'Copied from code.py, to remove the dependency'
    oldvalue = 0
    try:
        oldvalue = file.softspace
    except AttributeError:
        pass
    try:
        file.softspace = newvalue
    except (AttributeError, TypeError):
        pass
    return oldvalue
Copied from code.py, to remove the dependency
@undoc
def softspace(file, newvalue):
    
    oldvalue = 0
    try:
        oldvalue = file.softspace
    except AttributeError:
        pass
    try:
        file.softspace = newvalue
    except (AttributeError, TypeError):
        pass
    return oldvalue