How To Create A Buffer In Python