Anonymous user
Chicago Python Workshop/Projects/Twitter: Difference between revisions
Chicago Python Workshop/Projects/Twitter (view source)
Revision as of 20:30, 8 December 2012
, 11 years ago→1. Read through and understand search: changed the sentence about passing options since that was inconsistent with how we had explained past before in class.
imported>Codersquid |
imported>Codersquid (→1. Read through and understand search: changed the sentence about passing options since that was inconsistent with how we had explained past before in class.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 17:
=== 1. Read through and understand <code>search</code> ===
# Open a terminal and navigate to the directory where you extracted Twitter.zip. If you need a reminder for how to open a terminal and navigate to a directory, follow the [[https://openhatch.org/wiki/Chicago_Python_Workshop/Setup#Goal_.234:_practice_navigating_the_computer_from_a_command_prompt|navigation setup goal]] from Friday.
# The directory you navigate to should contain ''twitter_api.py'' and ''twitter_functions.py''.
#
# Use the command line to run <code>python twitter_api.py --search</code> with various search terms, e.g.
#* <code>python twitter_api.py --search=Python</code>
Line 25:
# Use the text editor to read through the <code>search</code> function in <code>twitter_functions.py</code>.
# Trace through the logic in <code>twitter_api.py</code> that turns the <code>--search</code> command line option into a call to <code>search</code>.
# Find <code>GetSearch</code> in the Twitter library code at http://code.google.com/p/python-twitter/source/browse/twitter.py. What other options could we have
<b>Check your understanding</b>: What does <code>api.GetSearch</code> return?
|