Atelier Montreal Python/Vendredi

From OpenHatch wiki

Bienvenue sur la page d’instructions pour la soirée de vendredi de l’atelier Montréal-Python!

Quand vous arrivez dans la salle, vous trouverez une prise de courant pour votre ordinateur ainsi que les détails du réseau wi-fi. Cette page liste les étapes qui vous permettront d’installer et de commencer à apprendre Python de façon autonome. La plupart des pages sont en anglais, mais nous allons faire de notre mieux pour traduire les ressources du vendredi en français pour faciliter les choses. Il vous faudra entre deux et trois heures pour parcourir toutes les étapes dans l’ordre; n’hésitez pas à nous demander de l’aide à tout moment!

Quand vous aurez fini, une personne de l’équipe vérifiera rapidement une liste de points avec vous afin de s’assurer que tout sera prêt pour demain. Merci de prendre un peu de temps pour cette étape avant de partir.

Objectif n° 1: Installer Python

Ces pages (en anglais) expliquent comment télécharger Python, l’installer et (pour Windows) le configurer.

Objectif n° 2: Préparer un éditeur de texte

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, just ask a staff member for help.

Objectif n° 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:

Objectif n° 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. This may seem unrelated to Python, but the first programs you’ll use and write will work from the command-line, so it is useful to know the basics. Later you’ll be able to write web applications or graphical programs.

Objectif n° 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.

Objectif n° 6: get dependencies installed for the Saturday projects

Objectif n° 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.



Objectif n° 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.

Objectif n° 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 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. Walk through the Tutorial concept that was most confusing for you. The Tutorial is here.
  8. 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 at 9:30am tomorrow back here at Notman House! 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