Python input output trouble
I'm working through http://www.tutorialspoint.com/python/python_files_io.htm

and trying to follow through on the tutorial code: 

    >>> fo = open("foo.txt", "wb")
    >>> fo.write("this");

However, I get the following error: 

    Traceback (most recent call last):
    File "<pyshell#3>", line 1, in <module>
    fo.write("this");
    TypeError: 'str' does not support the buffer interface

According to the tutorial, this should write the content "this" into the newly created file.

I'm guessing the syntax might have changed since the tutorial i'm using was written but I could use some help to point me in the right direction here, thanks. 
Python input output trouble
===

I'm working through http://www.tutorialspoint.com/python/python_files_io.htm

and trying to follow through on the tutorial code: 

    >>> fo = open("foo.txt", "wb")
    >>> fo.write("this");

However, I get the following error: 

    Traceback (most recent call last):
    File "<pyshell#3>", line 1, in <module>
    fo.write("this");
    TypeError: 'str' does not support the buffer interface

According to the tutorial, this should write the content "this" into the newly created file.

I'm guessing the syntax might have changed since the tutorial i'm using was written but I could use some help to point me in the right direction here, thanks. 