From ddc640e687d4dc86bc2df315ea8e99eef769eb32 Mon Sep 17 00:00:00 2001 From: Davin Baragiotta Date: Wed, 4 Sep 2013 13:32:12 -0400 Subject: [PATCH] =?utf8?q?ajout=20atelier=20Debian=20Python=20de=20Montr=C3=A9?= =?utf8?q?al-Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../mtlpy-workshop-debian-dev-env-fr.ipynb | 187 ++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 ateliers/debian-python-virtualenv/mtlpy-workshop-debian-dev-env-fr.ipynb diff --git a/ateliers/debian-python-virtualenv/mtlpy-workshop-debian-dev-env-fr.ipynb b/ateliers/debian-python-virtualenv/mtlpy-workshop-debian-dev-env-fr.ipynb new file mode 100644 index 0000000..4031f5b --- /dev/null +++ b/ateliers/debian-python-virtualenv/mtlpy-workshop-debian-dev-env-fr.ipynb @@ -0,0 +1,187 @@ +{ + "metadata": { + "name": "mtlpy-workshop-debian-dev-env-fr" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Debian + Python = \u2661\n", + "\n", + "## Pr\u00e9requis\n", + "\n", + "* Debian install\u00e9e\n", + "\n", + "## Python\n", + "\n", + "* Lancer un terminal
\n",
+      "$\n",
+      "
\n", + "\n", + "* Lancer Python
\n",
+      "$ python\n",
+      "
\n", + "\n", + "* Identifier la version par d\u00e9faut de Python
\n",
+      "$ python\n",
+      "Python 2.7.3 (default, Jan  2 2013, 16:53:07) \n",
+      "[GCC 4.7.2] on linux2\n",
+      "Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n",
+      "<<<\n",
+      "
\n", + "\n", + "* Coder un truc
\n",
+      "<<< print \"Hello World!\"\n",
+      "Hello World!\n",
+      "
\n", + "\n", + "* Dans la vraie vie on \u00e9crit des scripts... donc il faut installer un \u00e9diteur de texte\n", + "\n", + "## Debian : installer un paquet Debian\n", + "\n", + "Comment trouver un paquet\n", + "\n", + "* Web : tous les paquets : [http://packages.debian.org/stable/allpackages](http://packages.debian.org/fr/stable/allpackages)\n", + "* Web : tous les paquets par cat\u00e9gorie : [http://packages.debian.org/stable/](http://packages.debian.org/fr/stable/)\n", + "* Web : paquets Python : [http://packages.debian.org/stable/python/](http://packages.debian.org/en/stable/python/)\n", + "\n", + "Comment installer (et supprimer) un paquet\n", + "\n", + "* Mode graphique : o\u00f9 aller
\n",
+      "Applications > Outils syst\u00e8me > Ajouter/supprimer des logiciels\n",
+      "
\n", + "* Ligne de commande : voici la commande
\n", + "(remplacer \"package-name\" avec le nom du paquet que vous voulez installer/supprimer)
\n",
+      "$ sudo apt-get install package-name\n",
+      "$ sudo apt-get remove package-name\n",
+      "
\n", + "\n", + "Paquets install\u00e9s au niveau syst\u00e8me (system-wide) vs install\u00e9s au niveau projet (project-wide)\n", + "\n", + "* Niveau syst\u00e8me : pour tous les projets, pourrait n\u00e9cessiter \"sudo\"\n", + "* Niveau projet : propre au projet, permet utilisation d'une version sp\u00e9cifique\n", + "\n", + "## \u00c9diteur texte\n", + "\n", + "[http://packages.debian.org/stable/editors/](http://packages.debian.org/stable/editors/)\n", + "\n", + "* Mode graphique : gedit est d\u00e9j\u00e0 l\u00e0\n", + "* Ligne de commande : emacs, vim, nano\n", + "* Quel choisir? une question de go\u00fbt\n", + "* Paquets Debian = \n", + "
\n",
+      "$ sudo apt-get install emacs\n",
+      "$ sudo apt-get install vim\n",
+      "$ sudo apt-get install nano\n",
+      "
\n", + "\n", + "## Python : interpr\u00e9teur Python\n", + "\n", + "* IPython : interpr\u00e9teur interactif
\n", + "pourquoi IPython?\n", + "* IPython notebook : pourrait \u00eatre utile pour les ateliers de Montr\u00e9al-Python ;)\n", + "* Paquets Debian = \n", + "
\n",
+      "$ sudo apt-get install ipython\n",
+      "$ sudo apt-get install ipython-notebook\n",
+      "
\n", + "\n", + "## Gestion des versions\n", + "\n", + "* Pourquoi g\u00e9rer les versions du code source?\n", + "* Quel choisir? git, mercurial...\n", + "* Paquets Debian = \n", + "
\n",
+      "$ sudo apt-get install git\n",
+      "$ sudo apt-get install gitk\n",
+      "$ sudo apt-get install mercurial\n",
+      "
\n", + "\n", + "## Extensions Python\n", + "\n", + "* Les extensions Python \u00e9crites dans d'autres langages pourraient \u00eatre n\u00e9cessaires, donc il nous faut des outils pour pouvoir les compiler
\n", + "ex.: gcc, pil...\n", + "* build-essentials, python-dev (sources de Python)\n", + "* Paquets Debian = \n", + "
\n",
+      "$ sudo apt-get install build-essential\n",
+      "$ sudo apt-get install python-dev\n",
+      "
\n", + "\n", + "## Environnements virtuels\n", + "\n", + "* Pour que les paquets soient install\u00e9s au niveau projet\n", + "* virtualenv\n", + "* Paquet Debian = \n", + "
\n",
+      "$ sudo apt-get install python-virtualenv\n",
+      "
\n", + "\n", + "## Outils Python offerts en paquet Debian\n", + "\n", + "Science\n", + "\n", + "* matplotlib, numpy\n", + "* Pour quoi?\n", + "* Paquets Debian =\n", + "
\n",
+      "$ sudo apt-get install python-matplotlib\n",
+      "$ sudo apt-get install python-numpy\n",
+      "
\n", + "\n", + "Frameworks web\n", + "\n", + "* Django, Pyramid\n", + "* Pour quoi? Quel choisir?\n", + "* Paquets Debian =\n", + "
\n",
+      "$ sudo apt-get install python-django\n",
+      "$ sudo apt-get install python-pyramid\n",
+      "
\n", + "\n", + "pilotes de base de donn\u00e9es\n", + "\n", + "* mysqldb, psycopg, sqlalchemy\n", + "* Pour quoi? Quel choisir?\n", + "* Paquets Debian =\n", + "
\n",
+      "$ sudo apt-get install python-mysqldb\n",
+      "$ sudo apt-get install python-psycopg2\n",
+      "$ sudo apt-get install python-sqlalchemy\n",
+      "
\n", + "\n", + "## Conclusion\n", + "\n", + "Eh bien...\n", + "\n", + "* Pas besoin de grand chose\n", + "* Tout est l\u00e0 dans Debian\n", + "* C'est simple et l'fun!\n", + "\n", + "## En suite?\n", + "\n", + "Nous sommes l\u00e0 pour aider \u00e0 l'installation et l'exploration de tout \u00e7a.\n", + "\n", + "Montr\u00e9al-Python : \u00e9v\u00e9nements \u00e0 venir.\n", + "\n", + "* MP 37, conf\u00e9rence mensuelle de MP : [http://montrealpython.org/2013/04/mp37/](http://montrealpython.org/2013/04/mp37/)\n", + "* Ateliers? Intro \u00e0 Python, Intro \u00e0 Django, autre?\n", + "* PyCon 2014 : \u00e0 Montr\u00e9al\n", + "\n", + "Suivez nous\n", + "\n", + "* [http://montrealpython.org](http://montrealpython.org)\n", + "* Voir contacts : liste de discussion, IRC, twitter\n", + "* Facebook : [https://www.facebook.com/montrealpython](https://www.facebook.com/montrealpython)\n" + ] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- 1.7.10.4