def strip(value):
    """ Strip the input value if it is a string and returns None
        if it had only whitespaces """
    if isinstance(value,basestring):
        value = value.strip()
        if len(value)==0:
            return None
    return value
 Strip the input value if it is a string and returns None
        if it had only whitespaces 
recipes/Python/578283_Read_tabular_datExcel_spreadsheets_fast_easy/recipe-578283.py