(envdict)
return '\n'.join(commands) + '\n'
Return the bash command as a string which should be eval'd

    Parameters
    ----------
    envdict: dict
        The dict returned by `get_envdict`
Return the bash command as a string which should be eval'd
Return the bash command as a string which should be eval d
def get_bash_command(envdict):
    """Return the bash command as a string which should be eval'd

    Parameters
    ----------
    envdict: dict
        The dict returned by `get_envdict`
    """
    commands = []
    fmtstr = 'export {key}="{value}"'
    for key, value in envdict.items():
        if os.environ.get(key, '') in ('', '[]') and value is not None:
            commands.append(fmtstr.format(key=key, value=str(value)))
    return '\n'.join(commands) + '\n'
def get_bash_command ( envdict ) : commands = [ ] fmtstr = 'export {key}="{value}"' for key , value in envdict . items ( ) : if os . environ . get ( key , '' ) in ( '' , '[]' ) and value is not None : commands . append ( fmtstr . format ( key = key , value = str ( value ) ) ) return '\n' . join ( commands ) + '\n'