Philadelphia Python Workshop/Setup: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Geography76
No edit summary
imported>Geography76
No edit summary
Line 1: Line 1:
Welcome to the Friday evening section of the Philadelphia Python Workshop!
Welcome to the Friday evening section of the Philadelphia Python Workshop!


==Instructions==
== Instructions ==


When you arrive, please start your laptop and get on the wireless network. Network information will be on the whiteboard. Once you join the network, 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 arrive, please start your laptop and get on the wireless network. Network information will be on the whiteboard. Once you join the network, 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. Please be sure to do this checkoff before you leave -- it'll make sure that you are in good shape for tomorrow.
At the end, a staff member will go through a checklist with you to make sure you're all set for tomorrow. Please be sure to do this checkoff before you leave -- it'll make sure that you are in good shape for tomorrow.


==Goal #1: set up Python==
== Goal #1: set up Python ==


This section has instructions for installing Python and running Python from a command prompt.
This section has instructions for installing Python and running Python from a command prompt.
Windows
OS X
Linux


* [[Philadelphia Python Workshop/Setup/Windows set up Python|Windows]]
==Goal #2: prepare a text editor==
* [[Philadelphia Python Workshop/Setup/OSX set up Python|OS X]]
* [[Philadelphia Python Workshop/Setup/Linux set up Python|Linux]]

== Goal #2: prepare a text editor ==

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.<br />


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.
If you would like to use a different text editor from the recommendation for your operating system, please let a staff member know.
Windows
OS X
Linux


* [[Philadelphia Python Workshop/Setup/Windows text editor|Windows]]
==Goal #3: practice starting and exiting Python==
* [[Philadelphia Python Workshop/Setup/OSX text editor|OS X]]
* [[Philadelphia Python Workshop/Setup/Linux text editor|Linux]]

== Goal #3: 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:
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:
Windows
OS X
Linux


* [[Philadelphia Python Workshop/Setup/Windows interactive Python|Windows]]
==Goal #4: practice navigating the computer from a command prompt==
* [[Philadelphia Python Workshop/Setup/OSX interactive Python|OS X]]
* [[Philadelphia Python Workshop/Setup/Linux interactive Python|Linux]]

== Goal #4: practice navigating the computer from a command prompt ==


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.
Windows
OS X
Linux


* [[Philadelphia Python Workshop/Setup/Windows terminal navigation|Windows]]
==Goal #5: practice running Python code from a file==
* [[Philadelphia Python Workshop/Setup/OSX terminal navigation|OS X]]
* [[Philadelphia Python Workshop/Setup/Linux terminal navigation|Linux]]

== 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.
Windows
OS X
Linux


* [[Philadelphia Python Workshop/Setup/Windows Python scripts|Windows]]
==Goal #6: get dependencies installed for the Saturday projects==
* [[Philadelphia Python Workshop/Setup/OSX Python scripts|OS X]]
* [[Philadelphia Python Workshop/Setup/Linux Python scripts|Linux]]


== Goal #6: get dependencies installed for the Saturday projects ==
Windows
OS X
Linux


* [[Philadelphia Python Workshop/Setup/Windows project dependencies|Windows]]
==Goal #7: start learning Python!==
* [[Philadelphia Python Workshop/Setup/OSX project dependencies|OS X]]
* [[Philadelphia Python Workshop/Setup/Linux project dependencies|Linux]]

== Goal #7: start learning Python! ==


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.


»Click here to work through tonight's tutorial«


<div style="font-size:125%">[[Philadelphia Python Workshop/Setup/Tutorial| &raquo;Click here to work through tonight's tutorial&laquo;]]</div>
==Goal #8: practice Python using CodingBat==
<br />

== Goal #8: practice Python using CodingBat ==


Learning about functions opened up a whole new way for us to practice, using the programming site codingbat.com. The big goal of this practice section is to get you thinking about how to solve problems in Python.
Learning about functions opened up a whole new way for us to practice, using the programming site codingbat.com. The big goal of this practice section is to get you thinking about how to solve problems in Python.


<br />
» Click here to work through tonight's CodingBat questions «
<div style="font-size:125%">[[Philadelphia Python Workshop/Setup/CodingBat Using Codingbat|&raquo; Click here to work through tonight's CodingBat questions &laquo;]]</div>



You don't have to create a CodingBat account to do the exercises, but if you do create an account it'll keep track of which problems you've completed and other statistics.
You don't have to create a CodingBat account to do the exercises, but if you do create an account it'll keep track of which problems you've completed and other statistics.


==Goal #9: Checkoff==
== Goal #9: Checkoff ==


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

<ol>
<li>
Start a command prompt, and from that command prompt start Python. Then quit Python.
Start a command prompt, and from that command prompt start Python. Then quit Python.
</li>
<li>
Create a new Python file (with a .py extension). In that file, type
Create a new Python file (with a .py extension). In that file, type

<pre>
print "Hello World"
print "Hello World"
</pre>

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.
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>
To test the Twitter installation, navigate to the Twitter directory and run twitter_api.py:
<li>

<li>To test the Twitter installation, navigate to the Twitter directory and run <code>twitter_api.py</code>:

<pre>
python twitter_api.py --search=python
python twitter_api.py --search=python
</pre>
Walk through the CodingBat problem that you had the most difficulty with. The Friday CodingBat questions are here.
</li>

<li>
Walk through the CodingBat problem that you had the most difficulty with. The Friday CodingBat questions are [http://codingbat.com/home/bostonpythonworkshop@gmail.com/Friday here].
</li>
</ol>

If you have any other questions about the tutorial, project setup, or CodingBat questions, now is a great time to ask!
If you have any other questions about the tutorial, project setup, or CodingBat questions, now is a great time to ask!


Line 78: Line 112:


You are done with the Friday portion of this Workshop. We'll see you back here at 9:30am tomorrow! Please bring the laptop you used tonight.
You are done with the Friday portion of this Workshop. We'll see you back here at 9:30am tomorrow! 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.

Revision as of 07:55, 27 March 2013

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

Instructions

When you arrive, please start your laptop and get on the wireless network. Network information will be on the whiteboard. Once you join the network, 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. Please be sure to do this checkoff before you leave -- it'll make sure that you are in good shape for tomorrow.

Goal #1: set up Python

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

Goal #2: prepare a text editor

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

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

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

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

Goal #7: start learning Python!

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.



Goal #8: practice Python using CodingBat

Learning about functions opened up a whole new way for us to practice, using the programming site codingbat.com. The big goal of this practice section is to get you thinking about how to solve problems in Python.



You don't have to create a CodingBat account to do the exercises, but if you do create an account it'll keep track of which problems you've completed and other statistics.

Goal #9: Checkoff

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 Twitter installation, navigate to the Twitter directory and run twitter_api.py:
    python twitter_api.py --search=python
    
  5. Walk through the CodingBat problem that you had the most difficulty with. The Friday CodingBat questions are here.

If you have any other questions about the tutorial, project setup, or CodingBat questions, now is a great time to ask!

Congratulations!

You are done with the Friday portion of this Workshop. We'll see you back here at 9:30am tomorrow! 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.