Chicago Python Workshop/Projects/Twitter: Difference between revisions

→‎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.
# Use your text editor to open the python files that we extracted from Twitter.zip during the Friday night [[Chicago Python Workshop/Setup|Setup]].
# The directory you navigate to should contain ''twitter_api.py'' and ''twitter_functions.py''.
#* twitter_api.py
#* Use your text editor to open ''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 passedused towith <code>GetSearch</code>?
 
<b>Check your understanding</b>: What does <code>api.GetSearch</code> return?
Anonymous user