import os
ratpoison = os.getenv('RATPOISON') or 'ratpoison'
def rp_command( *args ):
    p = os.popen( ratpoison + ' -c ' + '"' + (' '.join(  args  ) ) + '"', 'r' )
    r = p.readlines();
    p.close();
    return r


def rp_abort( *args ): return rp_command ( 'abort ' +  ' '.join( args ) )
def rp_addhook( *args ): return rp_command ( 'addhook ' +  ' '.join( args ) )
def rp_alias( *args ): return rp_command ( 'alias ' +  ' '.join( args ) )
def rp_banish( *args ): return rp_command ( 'banish ' +  ' '.join( args ) )
def rp_chdir( *args ): return rp_command ( 'chdir ' +  ' '.join( args ) )
def rp_clrunmanaged( *args ): return rp_command ( 'clrunmanaged ' +  ' '.join( args ) )
def rp_colon( *args ): return rp_command ( 'colon ' +  ' '.join( args ) )
def rp_curframe( *args ): return rp_command ( 'curframe ' +  ' '.join( args ) )
def rp_definekey( *args ): return rp_command ( 'definekey ' +  ' '.join( args ) )
def rp_undefinekey( *args ): return rp_command ( 'undefinekey ' +  ' '.join( args ) )
def rp_delete( *args ): return rp_command ( 'delete ' +  ' '.join( args ) )
def rp_delkmap( *args ): return rp_command ( 'delkmap ' +  ' '.join( args ) )
def rp_echo( *args ): return rp_command ( 'echo ' +  ' '.join( args ) )
def rp_escape( *args ): return rp_command ( 'escape ' +  ' '.join( args ) )
def rp_exec( *args ): return rp_command ( 'exec ' +  ' '.join( args ) )
def rp_execa( *args ): return rp_command ( 'execa ' +  ' '.join( args ) )
def rp_execf( *args ): return rp_command ( 'execf ' +  ' '.join( args ) )
def rp_fdump( *args ): return rp_command ( 'fdump ' +  ' '.join( args ) )
def rp_focus( *args ): return rp_command ( 'focus ' +  ' '.join( args ) )
def rp_focusprev( *args ): return rp_command ( 'focusprev ' +  ' '.join( args ) )
def rp_focusdown( *args ): return rp_command ( 'focusdown ' +  ' '.join( args ) )
def rp_exchangeup( *args ): return rp_command ( 'exchangeup ' +  ' '.join( args ) )
def rp_exchangedown( *args ): return rp_command ( 'exchangedown ' +  ' '.join( args ) )
def rp_exchangeleft( *args ): return rp_command ( 'exchangeleft ' +  ' '.join( args ) )
def rp_exchangeright( *args ): return rp_command ( 'exchangeright ' +  ' '.join( args ) )
def rp_swap( *args ): return rp_command ( 'swap ' +  ' '.join( args ) )
def rp_focuslast( *args ): return rp_command ( 'focuslast ' +  ' '.join( args ) )
def rp_focusleft( *args ): return rp_command ( 'focusleft ' +  ' '.join( args ) )
def rp_focusright( *args ): return rp_command ( 'focusright ' +  ' '.join( args ) )
def rp_focusup( *args ): return rp_command ( 'focusup ' +  ' '.join( args ) )
def rp_frestore( *args ): return rp_command ( 'frestore ' +  ' '.join( args ) )
def rp_fselect( *args ): return rp_command ( 'fselect ' +  ' '.join( args ) )
def rp_gdelete( *args ): return rp_command ( 'gdelete ' +  ' '.join( args ) )
def rp_getenv( *args ): return rp_command ( 'getenv ' +  ' '.join( args ) )
def rp_gmerge( *args ): return rp_command ( 'gmerge ' +  ' '.join( args ) )
def rp_gmove( *args ): return rp_command ( 'gmove ' +  ' '.join( args ) )
def rp_gnew( *args ): return rp_command ( 'gnew ' +  ' '.join( args ) )
def rp_gnewbg( *args ): return rp_command ( 'gnewbg ' +  ' '.join( args ) )
def rp_gnumber( *args ): return rp_command ( 'gnumber ' +  ' '.join( args ) )
def rp_grename( *args ): return rp_command ( 'grename ' +  ' '.join( args ) )
def rp_gnext( *args ): return rp_command ( 'gnext ' +  ' '.join( args ) )
def rp_gprev( *args ): return rp_command ( 'gprev ' +  ' '.join( args ) )
def rp_gother( *args ): return rp_command ( 'gother ' +  ' '.join( args ) )
def rp_gravity( *args ): return rp_command ( 'gravity ' +  ' '.join( args ) )
def rp_groups( *args ): return rp_command ( 'groups ' +  ' '.join( args ) )
def rp_gselect( *args ): return rp_command ( 'gselect ' +  ' '.join( args ) )
def rp_help( *args ): return rp_command ( 'help ' +  ' '.join( args ) )
def rp_hsplit( *args ): return rp_command ( 'hsplit ' +  ' '.join( args ) )
def rp_info( *args ): return rp_command ( 'info ' +  ' '.join( args ) )
def rp_kill( *args ): return rp_command ( 'kill ' +  ' '.join( args ) )
def rp_lastmsg( *args ): return rp_command ( 'lastmsg ' +  ' '.join( args ) )
def rp_license( *args ): return rp_command ( 'license ' +  ' '.join( args ) )
def rp_link( *args ): return rp_command ( 'link ' +  ' '.join( args ) )
def rp_listhook( *args ): return rp_command ( 'listhook ' +  ' '.join( args ) )
def rp_meta( *args ): return rp_command ( 'meta ' +  ' '.join( args ) )
def rp_msgwait( *args ): return rp_command ( 'msgwait ' +  ' '.join( args ) )
def rp_newkmap( *args ): return rp_command ( 'newkmap ' +  ' '.join( args ) )
def rp_newwm( *args ): return rp_command ( 'newwm ' +  ' '.join( args ) )
def rp_next( *args ): return rp_command ( 'next ' +  ' '.join( args ) )
def rp_nextscreen( *args ): return rp_command ( 'nextscreen ' +  ' '.join( args ) )
def rp_number( *args ): return rp_command ( 'number ' +  ' '.join( args ) )
def rp_only( *args ): return rp_command ( 'only ' +  ' '.join( args ) )
def rp_other( *args ): return rp_command ( 'other ' +  ' '.join( args ) )
def rp_prev( *args ): return rp_command ( 'prev ' +  ' '.join( args ) )
def rp_prevscreen( *args ): return rp_command ( 'prevscreen ' +  ' '.join( args ) )
def rp_quit( *args ): return rp_command ( 'quit ' +  ' '.join( args ) )
def rp_ratinfo( *args ): return rp_command ( 'ratinfo ' +  ' '.join( args ) )
def rp_ratrelinfo( *args ): return rp_command ( 'ratrelinfo ' +  ' '.join( args ) )
def rp_banishrel( *args ): return rp_command ( 'banishrel ' +  ' '.join( args ) )
def rp_ratwarp( *args ): return rp_command ( 'ratwarp ' +  ' '.join( args ) )
def rp_ratrelwarp( *args ): return rp_command ( 'ratrelwarp ' +  ' '.join( args ) )
def rp_ratclick( *args ): return rp_command ( 'ratclick ' +  ' '.join( args ) )
def rp_rathold( *args ): return rp_command ( 'rathold ' +  ' '.join( args ) )
def rp_readkey( *args ): return rp_command ( 'readkey ' +  ' '.join( args ) )
def rp_redisplay( *args ): return rp_command ( 'redisplay ' +  ' '.join( args ) )
def rp_remhook( *args ): return rp_command ( 'remhook ' +  ' '.join( args ) )
def rp_remove( *args ): return rp_command ( 'remove ' +  ' '.join( args ) )
def rp_resize( *args ): return rp_command ( 'resize ' +  ' '.join( args ) )
def rp_restart( *args ): return rp_command ( 'restart ' +  ' '.join( args ) )
def rp_rudeness( *args ): return rp_command ( 'rudeness ' +  ' '.join( args ) )
def rp_select( *args ): return rp_command ( 'select ' +  ' '.join( args ) )
def rp_set( *args ): return rp_command ( 'set ' +  ' '.join( args ) )
def rp_setenv( *args ): return rp_command ( 'setenv ' +  ' '.join( args ) )
def rp_shrink( *args ): return rp_command ( 'shrink ' +  ' '.join( args ) )
def rp_sfrestore( *args ): return rp_command ( 'sfrestore ' +  ' '.join( args ) )
def rp_source( *args ): return rp_command ( 'source ' +  ' '.join( args ) )
def rp_sselect( *args ): return rp_command ( 'sselect ' +  ' '.join( args ) )
def rp_startup_message( *args ): return rp_command ( 'startup_message ' +  ' '.join( args ) )
def rp_time( *args ): return rp_command ( 'time ' +  ' '.join( args ) )
def rp_title( *args ): return rp_command ( 'title ' +  ' '.join( args ) )
def rp_tmpwm( *args ): return rp_command ( 'tmpwm ' +  ' '.join( args ) )
def rp_unalias( *args ): return rp_command ( 'unalias ' +  ' '.join( args ) )
def rp_unmanage( *args ): return rp_command ( 'unmanage ' +  ' '.join( args ) )
def rp_unsetenv( *args ): return rp_command ( 'unsetenv ' +  ' '.join( args ) )
def rp_verbexec( *args ): return rp_command ( 'verbexec ' +  ' '.join( args ) )
def rp_version( *args ): return rp_command ( 'version ' +  ' '.join( args ) )
def rp_vsplit( *args ): return rp_command ( 'vsplit ' +  ' '.join( args ) )
def rp_warp( *args ): return rp_command ( 'warp ' +  ' '.join( args ) )
def rp_windows( *args ): return rp_command ( 'windows ' +  ' '.join( args ) )
def rp_cnext( *args ): return rp_command ( 'cnext ' +  ' '.join( args ) )
def rp_cother( *args ): return rp_command ( 'cother ' +  ' '.join( args ) )
def rp_cprev( *args ): return rp_command ( 'cprev ' +  ' '.join( args ) )
def rp_dedicate( *args ): return rp_command ( 'dedicate ' +  ' '.join( args ) )
def rp_describekey( *args ): return rp_command ( 'describekey ' +  ' '.join( args ) )
def rp_inext( *args ): return rp_command ( 'inext ' +  ' '.join( args ) )
def rp_iother( *args ): return rp_command ( 'iother ' +  ' '.join( args ) )
def rp_iprev( *args ): return rp_command ( 'iprev ' +  ' '.join( args ) )
def rp_prompt( *args ): return rp_command ( 'prompt ' +  ' '.join( args ) )
def rp_sdump( *args ): return rp_command ( 'sdump ' +  ' '.join( args ) )
def rp_sfdump( *args ): return rp_command ( 'sfdump ' +  ' '.join( args ) )
def rp_undo( *args ): return rp_command ( 'undo ' +  ' '.join( args ) )
def rp_redo( *args ): return rp_command ( 'redo ' +  ' '.join( args ) )
def rp_putsel( *args ): return rp_command ( 'putsel ' +  ' '.join( args ) )
def rp_getsel( *args ): return rp_command ( 'getsel ' +  ' '.join( args ) )
def rp_compat( *args ): return rp_command ( 'compat ' +  ' '.join( args ) )
