def bash(command='bash'):
 bashrc = os.path.join(os.path.dirname(__file__), 'bashrc.sh')
 child = pexpect.spawn(command, ['--rcfile', bashrc], echo=False, encoding='utf-8')
 ps1 = ((PEXPECT_PROMPT[:5] + u'\\[\\]') + PEXPECT_PROMPT[5:])
 ps2 = ((PEXPECT_CONTINUATION_PROMPT[:5] + u'\\[\\]') + PEXPECT_CONTINUATION_PROMPT[5:])
 prompt_change = u"PS1='{0}' PS2='{1}' PROMPT_COMMAND=''".format(ps1, ps2)
 return REPLWrapper(child, u'\\$', prompt_change, extra_init_cmd='export PAGER=cat')

def bash ( command = 'bash' ) : bashrc = os . path . join ( os . path . dirname ( __file__ ) , 'bashrc.sh' ) child = pexpect . spawn ( command , [ '--rcfile' , bashrc ] , echo = False , encoding = 'utf-8' ) ps1 = ( ( PEXPECT_PROMPT [ : 5 ] + u'\\[\\]' ) + PEXPECT_PROMPT [ 5 : ] ) ps2 = ( ( PEXPECT_CONTINUATION_PROMPT [ : 5 ] + u'\\[\\]' ) + PEXPECT_CONTINUATION_PROMPT [ 5 : ] ) prompt_change = u"PS1='{0}' PS2='{1}' PROMPT_COMMAND=''" . format ( ps1 , ps2 ) return REPLWrapper ( child , u'\\$' , prompt_change , extra_init_cmd = 'export PAGER=cat' )
start a bash shell and return a :class:replwrapper object .