Difference between revisions of "Boston Python Workshop 4/Friday"

From OpenHatch wiki
Jump to navigation Jump to search
imported>Jesstess
imported>Paulproteus
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Welcome to the Friday evening section of the Boston Python Workshop!
 
Welcome to the Friday evening section of the Boston Python Workshop!
  
When you get to Google, please start your laptop and get on the wireless network. Then work through the goals on this page in order; they should take between 2 and 3 hours. Lots of staff will be around to help troubleshoot and to answer questions -- don't hesitate to ask!
+
When you get to MIT, please start your laptop and get on the wireless network. Try to join the one called "MIT", not "MIT GUEST". Then work through the goals on this page in order; they should take between 2 and 3 hours. Lots of staff will be around to help troubleshoot and to answer questions -- don't hesitate to ask!
  
 
At the end, a staff member will go through a checklist with you to make sure you're all set for tomorrow.
 
At the end, a staff member will go through a checklist with you to make sure you're all set for tomorrow.
Line 19: Line 19:
 
If you would like to use a different text editor from the recommendation for your operating system, please let a staff member know.
 
If you would like to use a different text editor from the recommendation for your operating system, please let a staff member know.
  
* [[Boston Python Workshop 3/Friday/Windows text editor|Windows]]
+
* [[Boston Python Workshop 4/Friday/Windows text editor|Windows]]
* [[Boston Python Workshop 3/Friday/OSX text editor|OS X]]
+
* [[Boston Python Workshop 4/Friday/OSX text editor|OS X]]
* [[Boston Python Workshop 3/Friday/Linux text editor|Linux]]
+
* [[Boston Python Workshop 4/Friday/Linux text editor|Linux]]
  
 
== Goal #3: practice starting and exiting Python ==
 
== Goal #3: practice starting and exiting Python ==
Line 27: Line 27:
 
We'll do a lot of learning and practicing at a Python prompt (this is "interactive" because you are typing the code and hitting enter to run it yourself, instead of running it from a file). So let's practice starting and exiting Python:
 
We'll do a lot of learning and practicing at a Python prompt (this is "interactive" because you are typing the code and hitting enter to run it yourself, instead of running it from a file). So let's practice starting and exiting Python:
  
* [[Boston Python Workshop 3/Friday/Windows interactive Python|Windows]]
+
* [[Boston Python Workshop 4/Friday/Windows interactive Python|Windows]]
* [[Boston Python Workshop 3/Friday/OSX interactive Python|OS X]]
+
* [[Boston Python Workshop 4/Friday/OSX interactive Python|OS X]]
* [[Boston Python Workshop 3/Friday/Linux interactive Python|Linux]]
+
* [[Boston Python Workshop 4/Friday/Linux interactive Python|Linux]]
  
 
== Goal #4: practice navigating the computer from a command prompt ==
 
== Goal #4: practice navigating the computer from a command prompt ==
Line 35: Line 35:
 
We will be running files containing Python code (Python "scripts") from the command prompt. You'll need to be able to navigate to those scripts using the command prompt so you can run them. In this section, we'll practice using these navigation commands.
 
We will be running files containing Python code (Python "scripts") from the command prompt. You'll need to be able to navigate to those scripts using the command prompt so you can run them. In this section, we'll practice using these navigation commands.
  
* [[Boston Python Workshop 3/Friday/Windows terminal navigation|Windows]]
+
* [[Boston Python Workshop 4/Friday/Windows terminal navigation|Windows]]
* [[Boston Python Workshop 3/Friday/OSX terminal navigation|OS X]]
+
* [[Boston Python Workshop 4/Friday/OSX terminal navigation|OS X]]
* [[Boston Python Workshop 3/Friday/Linux terminal navigation|Linux]]
+
* [[Boston Python Workshop 4/Friday/Linux terminal navigation|Linux]]
 
== Goal #5: practice running Python code from a file ==
 
== Goal #5: practice running Python code from a file ==
  
 
Interactive Python programming at a Python prompt is great for short pieces of code and for testing ideas. For longer code, it can be easier to save the code in a file, and execute the contents of that file (aka a Python script). In this section, we'll practice running Python scripts.
 
Interactive Python programming at a Python prompt is great for short pieces of code and for testing ideas. For longer code, it can be easier to save the code in a file, and execute the contents of that file (aka a Python script). In this section, we'll practice running Python scripts.
  
* [[Boston Python Workshop 3/Friday/Windows Python scripts|Windows]]
+
* [[Boston Python Workshop 4/Friday/Windows Python scripts|Windows]]
* [[Boston Python Workshop 3/Friday/OSX Python scripts|OS X]]
+
* [[Boston Python Workshop 4/Friday/OSX Python scripts|OS X]]
* [[Boston Python Workshop 3/Friday/Linux Python scripts|Linux]]
+
* [[Boston Python Workshop 4/Friday/Linux Python scripts|Linux]]
  
 
== Goal #6: get dependencies installed for the Saturday projects ==
 
== Goal #6: get dependencies installed for the Saturday projects ==
  
* [[Boston Python Workshop 3/Friday/Windows project dependencies|Windows]]
+
* [[Boston Python Workshop 4/Friday/Windows project dependencies|Windows]]
* [[Boston Python Workshop 3/Friday/OSX project dependencies|OS X]]
+
* [[Boston Python Workshop 4/Friday/OSX project dependencies|OS X]]
* [[Boston Python Workshop 3/Friday/Linux project dependencies|Linux]]
+
* [[Boston Python Workshop 4/Friday/Linux project dependencies|Linux]]
  
 
== Goal #7: start learning Python! ==
 
== Goal #7: start learning Python! ==
Line 56: Line 56:
 
It's time to start learning, reading, and writing some Python! Tonight, you'll work through a self-directed tutorial. Saturday morning, we'll have an interactive lecture to cover more Python basics.
 
It's time to start learning, reading, and writing some Python! Tonight, you'll work through a self-directed tutorial. Saturday morning, we'll have an interactive lecture to cover more Python basics.
  
[[Boston Python Workshop 3/Friday/Tutorial| Work through the tutorial]]
+
[[Boston Python Workshop 4/Friday/Tutorial| Work through the tutorial]]
  
 
== Goal #8: Checkoff ==
 
== Goal #8: Checkoff ==
Line 74: Line 74:
  
 
and save the file. From a command prompt, navigate to and execute that Python script.
 
and save the file. From a command prompt, navigate to and execute that Python script.
 +
</li>
 +
<li>
 +
Open your text editor, and press "Tab". Use the left arrow key to show the instructor that you are using spaces to indent, not tabs.
 
</li>
 
</li>
 
<li>
 
<li>
Line 94: Line 97:
 
python twitter_api.py --search=python
 
python twitter_api.py --search=python
 
</pre>
 
</pre>
 +
</li>
 +
 +
<li>
 +
What was the hardest part of the tutorial? How were the CodingBat questions? Review these parts briefly. If you have any questions about them, now's a great time to ask them!
 
</li>
 
</li>
 
</ol>
 
</ol>
Line 99: Line 106:
 
==Congratulations!==
 
==Congratulations!==
  
You are done with the Friday portion of this Workshop. We'll see you at 9:45am tomorrow back here at HubSpot! Please bring the laptop you used tonight.
+
You are done with the Friday portion of this Workshop. We'll see you at 9:45am tomorrow back here at MIT ([[Boston_Python_Workshop_4#Location| remember that we are in a different room tomorrow, 32-155]] )! Please bring the laptop you used tonight.
  
 
If you have any questions, comments, or feedback on tonight's material, don't hesitate to let a staff member know.
 
If you have any questions, comments, or feedback on tonight's material, don't hesitate to let a staff member know.
  
[[Boston Python Workshop 3|&laquo; Back to the Workshop home page]]
+
[[Boston Python Workshop 4|&laquo; Back to the Workshop home page]]

Latest revision as of 14:42, 28 September 2011

Welcome to the Friday evening section of the Boston Python Workshop!

When you get to MIT, please start your laptop and get on the wireless network. Try to join the one called "MIT", not "MIT GUEST". Then work through the goals on this page in order; they should take between 2 and 3 hours. Lots of staff will be around to help troubleshoot and to answer questions -- don't hesitate to ask!

At the end, a staff member will go through a checklist with you to make sure you're all set for tomorrow.

Goal #1: set up Python[edit]

This section has instructions for installing Python and running Python from a command prompt.

Goal #2: prepare a text editor[edit]

In addition to being able to run Python, we are going to install a good text editor for writing and saving Python code during the workshop.

If you would like to use a different text editor from the recommendation for your operating system, please let a staff member know.

Goal #3: practice starting and exiting Python[edit]

We'll do a lot of learning and practicing at a Python prompt (this is "interactive" because you are typing the code and hitting enter to run it yourself, instead of running it from a file). So let's practice starting and exiting Python:

Goal #4: practice navigating the computer from a command prompt[edit]

We will be running files containing Python code (Python "scripts") from the command prompt. You'll need to be able to navigate to those scripts using the command prompt so you can run them. In this section, we'll practice using these navigation commands.

Goal #5: practice running Python code from a file[edit]

Interactive Python programming at a Python prompt is great for short pieces of code and for testing ideas. For longer code, it can be easier to save the code in a file, and execute the contents of that file (aka a Python script). In this section, we'll practice running Python scripts.

Goal #6: get dependencies installed for the Saturday projects[edit]

Goal #7: start learning Python![edit]

It's time to start learning, reading, and writing some Python! Tonight, you'll work through a self-directed tutorial. Saturday morning, we'll have an interactive lecture to cover more Python basics.

Work through the tutorial

Goal #8: Checkoff[edit]

Tell a staff member that you are ready to be checked off. Together you will go through the following check-off steps:

  1. Start a command prompt, and from that command prompt start Python. Then quit Python.
  2. Create a new Python file (with a .py extension). In that file, type
    print "Hello World"
    

    and save the file. From a command prompt, navigate to and execute that Python script.

  3. Open your text editor, and press "Tab". Use the left arrow key to show the instructor that you are using spaces to indent, not tabs.
  4. To test the ColorWall installation: navigate to the ColorWall directory and run run.py:
    python run.py -a
    
  5. To test the Wordplay installation: navigate to the Wordplay directory and run words1.py:
    python words1.py
    
  6. To test the Twitter installlation, navigate to the Twitter directory and run twitter_api.py:
    python twitter_api.py --search=python
    
  7. What was the hardest part of the tutorial? How were the CodingBat questions? Review these parts briefly. If you have any questions about them, now's a great time to ask them!

Congratulations![edit]

You are done with the Friday portion of this Workshop. We'll see you at 9:45am tomorrow back here at MIT ( remember that we are in a different room tomorrow, 32-155 )! Please bring the laptop you used tonight.

If you have any questions, comments, or feedback on tonight's material, don't hesitate to let a staff member know.

« Back to the Workshop home page