PythonJensFromKidsSeries
From Wiki
This is the wiki page to the showmedo Python from kids video series
Contents |
[edit] Welcome
Please note that all the videos are recorded in german language, but have English subtitles.
This is the wiki page for the video series "Python from kids". It is aimed at adults mostly and geek kids too. Feel free to edit or use the discussion page of to leave comments.
You can contact me direct by sending an email to Horst JENS or check out my python courses at http://www.spielend-programmieren.at.
Please consider the that all your contributions fall under the Creative-Commons Attribution-NonCommercial-ShareAlike 2.5 license (see http://creativecommons.org/about/) and that some of your contributions will hopefully become part of a book about Pygame...also here at ShowMeDo.
[edit] Content
- video 1 of 3: Chen showing how to define a function using Rurple
- video 2 of 3: Lexi showing how to download and use a third-party module (easygui) and messomg around with it using drpython.
- video 3 of 3: Leo showing how to use drpython and pydoc to understand the buttonbox function of easygui
[edit] video 1 of 3: Chen and Rurple / def
Rur-ple (http://rur-ple.sourceforge.net/) is a very cool, pretty and multi-lingual learning enviroment for python. It features a little robot that can only be moved forward and made a 90° left-turn, but he understand some python commands ! Using Rur-ple is a great way to learn/teach/use python. Install instructions for Rur-ple:
- make sure python is installed or download it from http://www.python.org
- make sure wxpython is installed or download it from http://www.wxpython.org/
- head to the download section and download rur-ple: https://sourceforge.net/project/showfiles.php?group_id=125834 , you need:
- the newest rurple file (look at the date); it contains the most up to date lessons.
- the newest lesson file (look at the date), if it is more recent than the rurple file.
ignore all other files for now and unzip the whole package into an empty folder (like your Desktop) Now you are ready to repeat what Chen had shown you.
[Note added by André Roberge: If you use a version of wxPython 2.7 and greater, rur-ple (up to version 1.0RC) will not work properly; it also has a bug when running with Linux Ubuntu with earlier version of wxPython. These will be fixed by me in version 1.0. In the meantime, feel free to contact me directly after downloading rur-ple if you find a bug.]
Other videos about Rur-Ple here at showmedo:
- http://showmedo.com/videos/video?name=rurple1_andreR&fromSeriesID=15
- http://showmedo.com/videos/video?name=rurple2_recursion_andreR&fromSeriesID=15
Chen's python program:
Unfortunately Chen was quite a bit nervous at the seventh take so you cannot see all of the program. Here it is:
#Rurple can only move() forward and turn_left() by default
#This definition teach him to turn_right()
def turn_right():
turn_left()
turn_left()
turn_left()
#If he stands on a beeper, this function makes him pick it up and move.
#instead of the else: also a simple not-indented move() command would work (and be more elegant).
def m()
if on_beeper():
pick_beeper()
move()
else:
move()
#Start
m()
turn_right()
m()
turn_right()
m()
turn_left()
m()
turn_off()
[edit] video 2 of 3: Lexi and easygui
Lexi show you pretty much all that is needed to repeat the actions in the video.
- make sure that Python is installed or download and install it from http://www.python.org
- Download easygui from http://easygui.sourceforge.net/
- Unzip it in the same location as your python program (like your Desktop)
- Lexi uses drpython (http://sourceforge.net/projects/drpython) as an editor, but it should work with any other python editor like idle as well.
Lexi's program:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import easygui
easygui.msgbox("HALLO","HALLO ÖSTERREICH")
Note from Leonidas: To change the standard font(size), i would never edit easygui. Better do:
import easygui easygui.DEFAULT_FONT_SIZE += 10
at the beginning of your program.
[edit] video 3 of 3: Leo and buttonbox / easygui
For this video, some preparation is needed.
- make sure that python is installed or download and install it from http://www.python.org
- make sure wxpython is installed or download it from http://www.wxpython.org/
- download drpython (the newest drpython file) from http://sourceforge.net/projects/drpython/ .
- unzip it into an suitable directory
- run drpython.py (you must make this file executable (right-click, permissions) first if you use linux)
- make sure that easygui (http://easygui.sourceforge.net/) is unzipped into the python folder so that python can find easygui. That is:
- on windows: c:\python24,
- on linux: /usr/lib/python/python2.5, you must login as root.
Replace the "2.5" with your Python version number, like "2.4" if you use a different version of python. Generally, it is the same place where all the python modules like random.py are located.
To learn more about the shebang look at wikipedia.
Leo's program:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import easygui
name=easygui.buttonbox("What's your name ?", "Question:", ["Leo", "Lexi", "Chen"])
msgbox("Hallo " + name + " !")
# "name" is no python function, it is just the "name" of a variable. Could have also been kidname, Mr_X or who_am_i
Note from Leonidas For string concatenation, i prefer this syntax:
msgbox("Hallo %s" % name)
[edit] Links
[edit] about this video series
This video was created on a Laptop using Ubuntu Linux (Edgy) with an webcam and the software XvidCap and Camorama. Subtitles where made with Subtitle Editor on Ubuntu. DrPython was changed so that all fonts are very big and no locale setting was given in the preferences. You can read a more detailed wiki page about how to make permanent subtitles.
[edit] News
- 2007-10 The class changed from http://www.profikids.at to http://www.hit.co.at
- 2007-09
- The boys got their price at the Ars Electronica festival in Linz, Austria. See pictures at Flickr
- 2007-06
- The boys won a price at the Ars electronica festival with this video series. See http://www.aec.at/de/prix/u19/winner_list.asp for more details.
- 2007-06
- The video series got reviewed in the online magazine The Python Papers, Volume 2, Issue2 2007
[edit] recommended reading
A byte of Python very good Python Tutorial for beginners (and everyone else too)]
[edit] Feedback / Discussion
- Thread on ubuntuforums.org
- Thread on ubuntuforums.org (crossposted)
- for links to feedback in german, please visit the german wiki page

