Boston Python workshop 2/Friday setup: Difference between revisions
imported>Paulproteus |
|||
(38 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
Welcome to the Friday evening section of the Boston Python Workshop! Setup hours are from |
Welcome to the Friday evening section of the Boston Python Workshop! Setup hours are from 6pm-9pm at [http://www.hubspot.com/company/contact/ HubSpot]. |
||
When you get to HubSpot, 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! |
|||
The goals for this evening are: |
|||
# set up Python |
|||
At the end, a staff member will go through a checklist with you to make sure you're all set for tomorrow. |
|||
⚫ | |||
# practice printing in Python and using Python as a calculator |
|||
⚫ | |||
== Goal #1: set up Python == |
== Goal #1: set up Python == |
||
This section has instructions for installing Python and running Python from a |
This section has instructions for installing Python and running Python from a command prompt. |
||
* [[Python on Windows|Windows]] |
|||
* [[Python on OSX|OS X]] |
|||
* [[Python on Linux|Linux]] |
|||
== Goal #2: Prepare a text editor == |
== Goal #2: Prepare a text editor == |
||
In addition to being able to run Python, |
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 /> |
||
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 2/Friday setup/Windows text editor|Windows]] |
* [[Boston Python workshop 2/Friday setup/Windows text editor|Windows]] |
||
* [[Boston Python workshop 2/Friday setup/Mac text editor| |
* [[Boston Python workshop 2/Friday setup/Mac text editor|OS X]] |
||
* [[Boston Python workshop 2/Friday setup/Linux text editor|Linux]] |
* [[Boston Python workshop 2/Friday setup/Linux text editor|Linux]] |
||
== Goal #3: practice |
== 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: |
|||
* [[Boston Python workshop 2/Friday setup/Interactive Python on Windows|Windows]] |
|||
* [[Boston Python workshop 2/Friday setup/Interactive Python on OSX|OS X]] |
|||
* [[Boston Python workshop 2/Friday setup/Interactive Python on Linux|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. |
|||
* [[Boston Python workshop 2/Friday setup/Terminal navigation on Windows|Windows]] |
|||
* [[Boston Python workshop 2/Friday setup/Terminal navigation on OSX|OS X]] |
|||
* [[Boston Python workshop 2/Friday setup/Terminal navigation on Linux|Linux]] |
|||
⚫ | |||
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 2/Friday setup/Python scripts on Windows|Windows]] |
|||
* [[Boston Python workshop 2/Friday setup/Python scripts on OSX|OS X]] |
|||
* [[Boston Python workshop 2/Friday setup/Python scripts on Linux|Linux]] |
|||
⚫ | |||
* [[Boston Python workshop 2/Friday setup/Windows project dependencies|Windows]] |
|||
* [[Boston Python workshop 2/Friday setup/Mac project dependencies|OS X]] |
|||
* [[Boston Python workshop 2/Friday 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. |
|||
[[Boston Python workshop 2/Friday tutorial| Click here to start working through the tutorial]] |
|||
== Goal #8: Checkoff == |
|||
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. |
|||
</li> |
|||
<li> |
|||
Create a new Python file (with a .py extension). In that file, type |
|||
<pre> |
|||
print "Hello World" |
|||
</pre> |
|||
and save the file. From a command prompt, navigate to and execute that Python script. |
|||
</li> |
|||
<li> |
|||
To test the ColorWall installation: navigate to the ColorWall directory and run <code>run.py</code>: |
|||
<pre> |
|||
python run.py |
|||
</pre> |
|||
</li> |
|||
<li> |
|||
To test the Wordplay installation: navigate to the Wordplay directory and run <code>words.py</code>: |
|||
<pre> |
|||
python words.py |
|||
</pre> |
|||
</li> |
|||
<li>To test the Twitter installlation, navigate to the Twitter directory and run <code>twitter_api.py</code>: |
|||
<pre> |
|||
python twitter_api.py --search=python |
|||
</pre> |
|||
</li> |
|||
</ol> |
|||
==Congratulations!== |
|||
Often in these directions, you'll need to type things at Python prompt. To get one: |
|||
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. |
|||
* On Windows: Start -> Run -> cmd.exe |
|||
** Type this, and press enter: |
|||
** python |
|||
* On Linux or Mac OS: |
|||
** Open a Terminal, and type 'python' |
|||
If you have any questions, comments, or feedback on tonight's material, don't hesitate to let a staff member know. |
|||
== Goal #4: practice printing in Python and using Python as a calculator == |
|||
[[Boston Python workshop 2|« Back to the Workshop home page]] |
|||
== Goal #5: get dependencies installed for the Saturday projects == |
Latest revision as of 18:36, 28 May 2011
Welcome to the Friday evening section of the Boston Python Workshop! Setup hours are from 6pm-9pm at HubSpot.
When you get to HubSpot, 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!
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
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:
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.
Click here to start working through the tutorial
Goal #8: Checkoff
Tell a staff member that you are ready to be checked off. Together you will go through the following check-off steps:
- Start a command prompt, and from that command prompt start Python. Then quit Python.
-
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.
-
To test the ColorWall installation: navigate to the ColorWall directory and run
run.py
:python run.py
-
To test the Wordplay installation: navigate to the Wordplay directory and run
words.py
:python words.py
- To test the Twitter installlation, navigate to the Twitter directory and run
twitter_api.py
:python twitter_api.py --search=python
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.
If you have any questions, comments, or feedback on tonight's material, don't hesitate to let a staff member know.