Difference between revisions of "Workshops/Python for Beginners"

From London Hackspace Wiki
Jump to navigation Jump to search
m
 
(19 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
'''Information for our introductory workshops on Python'''
 
'''Information for our introductory workshops on Python'''
 +
 +
=Important things =
 +
 +
* <s>'''Date & time - 28th of July, 2013 10am sharp till 5pm'''</s> - CANCELLED - Will try and reschedule
 +
* Bring a laptop with the required software
 +
* We recommend a donation of £20 for the session if you are a non-member
 +
* Please sign up at the bottom of the page or use [http://www.eventbrite.co.uk/edit?msg=1&saved=1&eid=7229340151 Eventbrite]
  
 
=Things you will Need=
 
=Things you will Need=
  
You will most definitely need a laptop or other computer that is capable of running pyglet and python. Windows, Linux or OSX is supported for this course. The most important thing you will need is the [http://www.section9.co.uk/PythonCourse.zip PythonCourse.zip] file which contains all the couse notes, readme files and python exercises we'll be doing.
 
  
==Setting up Your System==
+
==Python3==
 +
 
 +
We'll be working in Python3, so to begin with, you'll need a copy of that. If you are using Windows, Linux or MacOSX you can get a copy from
 +
 
 +
[http://www.python.org/download/releases/3.3.2/ http://www.python.org/download/releases/3.3.2/]
 +
 
 +
3.3.2 is a good version to use. Grab the one you need.
 +
 
 +
Alternatively, if you are a l33t haxor you can use something like
  
There are 4 things you need:
+
  apt-get install python3
  
* '''Python''' - Either the 2.5 or 2.6.6 vintage. [http://www.python.org/download/releases/2.6.6/ http://www.python.org/download/releases/2.6.6/]
+
or python3.2 or whichever your version of Ubuntu is.  
* '''Pyglet''' - [http://www.pyglet.org/download.html http://www.pyglet.org/download.html]
+
 
* The course code. This will be refined and released closer to the time.
+
If you like to use [http://mxcl.github.io/homebrew/ Mac Homebrew] you can use something like
* '''A DECENT TEXT EDITOR''' - We can't stress this enough! No really!
+
 
 +
  brew install python32
 +
 
 +
==Some kind of Terminal thing==
 +
 
 +
If you are using Windows, get used to using the '''cmd''' program. You'll need it. Under MacOSX you have the '''terminal.app''' or you can use [http://www.iterm2.com/#/section/home iTerm2]. If you are using Linux, thats no bother, you'll have a terminal application no doubt.
 +
 
 +
 
 +
==A good text editor==
 +
 
 +
Python comes with IDLE on some systems and thats alright but its largely a pain in the long run.
  
 
===Windows===
 
===Windows===
  
You'll need a copy of Python. We recommend the 2.6.6 branch installer which comes as an MSI file. Simply double click to install. You can grab it from the [http://www.python.org/download/releases/2.6.6/ Python.org Releases page]. We can't use 2.7 yet because the Pyglet library doesn't run yet.
+
[http://notepad-plus-plus.org/ Notepad ++] is pretty much the best text editor on Windows. You can also use [http://www.sublimetext.com/2 sublime text 2]
  
Next you'll need the installer for Pyglet. This comes as an MSI too and you can simply double click and install.
+
===OSX===
  
[http://notepad-plus-plus.org/ Notepad ++] is pretty much the best text editor on Windows
+
[http://www.sublimetext.com/2 sublime text 2] is pretty good but also [http://www.barebones.com/products/textwrangler/ Text Wrangler]. Dont use the default TextEdit!!!
  
===OSX===
+
===Linux===
 +
 
 +
Vim. Not emacs :P
  
Python comes installed as standard but there are a few versions. You'll need to use the '''python2.5''' command in your terminal and make sure you install pyglet for the 2.5 python install. You can grab the OSX DMG from [http://www.pyglet.org/download.html the Pyglet page] and install it. It should work straight out of the box.
 
  
Under OSX, I find [http://www.barebones.com/products/textwrangler/ textwrangler] to be the best.
+
==Pyglet==
  
===Linux===
+
The library we are using is called Pyglet. Dont worry, I've included it in the lessons
  
Who can say?! There are several versions of Python for Linux but Pyglet generally works with 2.5 and 2.6 as oppose to 2.7/3.0. Ubuntu may have an install candidate inside apt for pyglet.
+
==THE CODE==
  
Kate or gedit are fine text editors for python (I'm sure there are VI, emacs people out there too, but chances are you already know python anyways)
+
So all the lessons can be downloaded from the github page here: [https://github.com/OniDaito/PythonCourse https://github.com/OniDaito/PythonCourse]
  
 +
You can download the whole thing as a zip (which is a good thing to do I'd say, if you dont have git installed). All the source code we are playing with, the examples and such, can be downloaded from here. Please download it and see if you can follow it before you arrive.
  
==Tickets==
+
==Resources for the Day==
  
Get your tickets [http://londonhackspace.eventwax.com/introduction-to-python on the sign-up page].
+
There are a great many resources for Python on the web. Here are a few of the ones I like:
  
==When?==
+
=== Learning Python in General ===
A 1 day workshop on Sunday 21st November
 
  
==Where?==
+
* [http://wiki.python.org/moin/BeginnersGuide/NonProgrammers http://wiki.python.org/moin/BeginnersGuide/NonProgrammers]
[[Laboratory 24]].
+
* [http://docs.python.org/py3k/ http://docs.python.org/py3k/]
 +
* [http://docs.python.org/ http://docs.python.org/ ]
 +
* [http://sheddingbikes.com/posts/1285754959.html Learning Python the Hard Way] -  a great little PDF that is actually quite easy to follow
 +
* [http://zephyrfalcon.org/labs/python_pitfalls.html Common python pitfalls]
  
==What?==
+
=== Pyglet Related ===
A Beginners introduction to Python with extra bits if you want them!
+
* [http://www.pyglet.org/doc/programming_guide/index.html http://www.pyglet.org/doc/programming_guide/index.html]
  
 +
==Sign up==
  
===Sunday===
+
Please add you name to the list below OR use the [http://www.eventbrite.co.uk/edit?msg=1&saved=1&eid=7229340151 http://www.eventbrite.co.uk/edit?msg=1&saved=1&eid=7229340151] - EVENTBRITE page
* 10.00 – 10.30 : Setup of Laptops with software.
 
* 10.30 – 13.00 : Workshop on 'Python Bomberman' with examples drawn from the Python Language
 
* 13.00 – 13.30 : Break
 
* 13.30 – 17.00 : Final advanced sections of Bomberman and coverage of one or two extra Python areas depending on requests. We can cover Django, pySerial, HTML servers/ Parsing, PyGame and Sockets.  We'll aim to have some other instructive examples, so if there's anything you're particularly interested in, click Edit to let us know.
 
  
 +
* [[User:Oni|Oni]]
 +
* [[User:Solexious|Solexious]] ([[User talk:Solexious|talk]])
 +
* [[User:CaptainTerrible|CaptainTerrible]] ([[User talk:CaptainTerrible|talk]])
 +
* [[User:SamLR|SamLR]] (willing to help)
 +
* [[User:Velyks|Velyks]]
 +
* [[User:NecatiOS|Necati]]
  
 
==For who?==
 
==For who?==
Line 63: Line 94:
 
==How much?==
 
==How much?==
 
There is no charge '''HOWEVER''' the space survives on donations and member subscriptions. We recommend a voluntary donation of £20 for the day.
 
There is no charge '''HOWEVER''' the space survives on donations and member subscriptions. We recommend a voluntary donation of £20 for the day.
 +
 +
[[Category:Workshops]]

Latest revision as of 10:49, 27 December 2013

Information for our introductory workshops on Python

Important things

  • Date & time - 28th of July, 2013 10am sharp till 5pm - CANCELLED - Will try and reschedule
  • Bring a laptop with the required software
  • We recommend a donation of £20 for the session if you are a non-member
  • Please sign up at the bottom of the page or use Eventbrite

Things you will Need

Python3

We'll be working in Python3, so to begin with, you'll need a copy of that. If you are using Windows, Linux or MacOSX you can get a copy from

http://www.python.org/download/releases/3.3.2/

3.3.2 is a good version to use. Grab the one you need.

Alternatively, if you are a l33t haxor you can use something like

 apt-get install python3

or python3.2 or whichever your version of Ubuntu is.

If you like to use Mac Homebrew you can use something like

 brew install python32 

Some kind of Terminal thing

If you are using Windows, get used to using the cmd program. You'll need it. Under MacOSX you have the terminal.app or you can use iTerm2. If you are using Linux, thats no bother, you'll have a terminal application no doubt.


A good text editor

Python comes with IDLE on some systems and thats alright but its largely a pain in the long run.

Windows

Notepad ++ is pretty much the best text editor on Windows. You can also use sublime text 2

OSX

sublime text 2 is pretty good but also Text Wrangler. Dont use the default TextEdit!!!

Linux

Vim. Not emacs :P


Pyglet

The library we are using is called Pyglet. Dont worry, I've included it in the lessons

THE CODE

So all the lessons can be downloaded from the github page here: https://github.com/OniDaito/PythonCourse

You can download the whole thing as a zip (which is a good thing to do I'd say, if you dont have git installed). All the source code we are playing with, the examples and such, can be downloaded from here. Please download it and see if you can follow it before you arrive.

Resources for the Day

There are a great many resources for Python on the web. Here are a few of the ones I like:

Learning Python in General

Pyglet Related

Sign up

Please add you name to the list below OR use the http://www.eventbrite.co.uk/edit?msg=1&saved=1&eid=7229340151 - EVENTBRITE page

For who?

Anyone!

If you can't program, still come along. The pace will be fast but if you want to start programming for the first time, Python is a great language to learn.

How much?

There is no charge HOWEVER the space survives on donations and member subscriptions. We recommend a voluntary donation of £20 for the day.