Assemble a command in a buffer:
remote.call('cmdbuffer','add','buffername','game.print(')
remote.call('cmdbuffer','add','buffername','"hello world"')
remote.call('cmdbuffer','add','buffername',')')
Execute and clear a buffer: (returns result of buffered command)
remote.call('cmdbuffer','exec','buffername')
Clear a buffer without executing it:
remote.call('cmdbuffer','clear','buffername')
Get contents of a buffer:
remote.call('cmdbuffer','getbuffer','buffername')