• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language
    Python
  • Created about 12 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Workshop material for "Introduction to Programming with Python"

Introduction to programming with Python

This workshop is an introduction to basic programming concepts and abstractions. It is laid out for hands-on workshops taking up roughly 4 hours. While we have tried to be compatible with Python 2 _and_ 3 wherever possible, we'd strongly encourage you to use Python 3.

The initial version of this material was loosely based on the "Python fĂźr Kids" book by Gregor Lingl. It is conceptual-- rather than incidental --that it trades in idioms for learnability. We believe that beginners sometimes have to jump through one or another hoop to fully comprehend the scope and applicability of a concept. Every introduced abstraction solves another pain point in the life of a beginning programmer.

HTML Version

You can view this workshop being hosted here: http://opentechschool.github.io/python-beginners/

The following sections are for people who want to contribute.

Setup

This workshop is written in the reStructuredText format. The .rst files can be edited with a normal text editor.

It can be rendered to several output formats using Sphinx. To do that, you need to have the following Python packages installed:

  • Sphinx (and its dependencies docutils and Pygments)
  • Fabric
  • sphinx-intl
  • sphinx-bootstrap-theme

You can install these with pip using pip install -r requirements.txt

To push / pull translations from Transifex you will need the package transifex-client as well.

Build

The fabric script fabfile.py contains tasks making the build process very easy.

If you just want to render the HTML version, it's sufficient to run:

$ fab build:en

Replace en with the language you'd like to build.

This will create a directory _build, containing the HTML version.

You can view this in a browser by running fab serve and visiting the web address listed.

Other builders can be passed as an argument. For instance use singlehtml to render the whole tutorial into a single HTML file:

$ fab build:en,singlehtml

Translation

Translations should normally be done through Transifex.

You can see the project on Transifex here.

After editing the tutorial, it is desirable to update sources for it.

  1. New translation templates (.pot) must be created, then po translation files are updated (or created for the first time) - fab gen_pots
  2. If you wish to upload new sources to transifex, you should use their cli client. tx push -s.
  3. To pull down translations for a particular language, use e.g. tx pull -l de, for de (german) or others.
  4. fab build:de will compile po files, and build the docs for that language.

It is also possible to edit and update po files manually, you can check out the other fab command (fab list) for help with that.

Note

only .po files should be committed to version control. .pot and .mo files are built automatically.

Deploy

The workshop is deployed as a GitHub Page. A good way to do that is described right here. To simplify this process, you can use a nifty fabric target:

$ fab setup

This recreates the _build/html folder, cloning the folder to the gh-pages branch of this repo. Then you should build updates for the desired language. Then cd into this folder, and git push the updates to update the branch. Like so:

$ fab build:en
$ cd _build/html
$ git status
$ git commit --all
$ git push

Credits

The material presented here is a collaborative work. It has been created largely by OpenTechSchool Python coaches. Every bit, from exercises to translations, has been contributed by the community. After every workshop where this material is used we try to gather feedback on how to improve the material.

License

This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

More Repositories

1

bookshelf

📚 Reading lists for learners
102
star
2

python-data-intro

Workshop material for "Introduction to Data Processing with Python"
HTML
40
star
3

www.opentechschool.org

The Source behind OTS' Website
HTML
35
star
4

js-beginners-day1

Outdated curriculum for the first day of JSFaB. Use https://github.com/OpenTechSchool/js-beginners-1
JavaScript
32
star
5

js-beginners-1

Curriculum for the first part of JavaScript workshop for absolute beginners.
JavaScript
27
star
6

sql-tutorial

Beginners' tutorial on how to extract information from databases with SQL
HTML
22
star
7

html-css-beginners

A friendly, afternoon introduction to html and css.
CSS
21
star
8

python-flask

Websites with Python Flask
HTML
19
star
9

social-coding

Social coding with Git and GitHub.
HTML
17
star
10

js-beginners-2

Curriculum introducing enhancing web pages with JavaScript (outdated)
HTML
14
star
11

python

Summary of the python provided by OTS
HTML
11
star
12

learn.opentechschool.org

Portal for all of OTS' learning materials
CSS
9
star
13

slides

Browser-based slides for OTS presentations
HTML
9
star
14

python-flask-code

Code samples for the python-flask workshop.
HTML
9
star
15

website-relaunch

🚀 🖥 Rebuilding the opentechschool.org website
HTML
8
star
16

websitenext

OpenTechSchool website
TypeScript
8
star
17

django-101

Python
7
star
18

blog.opentechschool.org

The source files used for our blog
CSS
6
star
19

arduino-workshop-01

Material for the workshop "Arduino for beginners", version 1.0
Arduino
6
star
20

coaches

📢 💪 Where coaching opportunity are announced
5
star
21

learners-meetup-berlin

JavaScript
5
star
22

advanced-css

A workshop on using CSS to the max
CSS
4
star
23

javascript

The JS subdomain
HTML
4
star
24

biopython

the biopython workshop material
2
star
25

python-scripting-mp3

Learn to use Python as a scripting replacement to sort your mp3 library
2
star
26

opentechschool.github.io

1
star
27

FrontendLearningMaterials

1
star
28

co-up.opentechschool.org

Site related to the event space Co.Up in Berlin
JavaScript
1
star
29

webgl-with-threejs

Learning materials for the four days workshop http://www.3dweb.cc/
1
star
30

datascience

home of website, projects, etc. related to datascience meetup
CSS
1
star
31

recommender

JavaScript
1
star
32

old-www

Current website of our organisation
Python
1
star
33

react-for-beginners

1
star
34

BLernStick

A mobile and secure Learn- and Working-Environment for school and home.
1
star
35

js-beginners-4h-workshop-1

moved to js-beginners-1
1
star