Home>

I wrote a code to get the Twitter timeline using python,
I got an error.
IndentationError: expected an indented block
So I tried putting a blank first,
IndentationError: unexpected indent
This time I came out with no need for indentation.
What kind of problem is it, and is the timeline acquisition code correct? I would appreciate if you could let me know not only about the error, but any other problems.
The code is as follows.

>>>auth.set_access_token(access_token, access_token_secret)
>>>api = tweepy.API(auth)
>>>status_list = api.home_timeline()
>>>from datetime import timedelate():
  File "<stdin>", line 1
    from datetime import timedelate():
                                   ^
SyntaxError: invalid syntax
>>>for status in api.home_timeline():
...
  File "<stdin>", line 2
    ^
IndentationError: expected an indented block
>>>for status in api.home_timeline():
  File "<stdin>", line 1
    for status in api.home_timeline():
    ^
IndentationError: unexpected indent
code


The sites I referred to are as follows.
[Link content] (www.pytry3g.com/entry/python-twitter-timeline#See the contents of the acquired timeline)