You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python Koans is an interactive tutorial for learning Python by making tests pass.
9
+
Python Koans is an interactive tutorial for learning the Python programming language by making tests pass.
10
10
11
11
Most tests are 'fixed' by filling the missing parts of assert functions. Eg:
12
12
@@ -28,7 +28,7 @@ Python Koans is available through git on Github:
28
28
29
29
http://github.com/gregmalcolm/python_koans
30
30
31
-
It is also mirrored on bitbucket for Mercurial users:
31
+
It is also mirrored on bitbucket for Mercurial users:
32
32
33
33
http://bitbucket.org/gregmalcolm/python_koans
34
34
@@ -38,20 +38,29 @@ Either site will allow you to download the source as a zip/gz/bz2.
38
38
Installing Python Koans
39
39
-----------------------
40
40
41
-
Aside from downloading or checking out the latest version of Python Koans, all you need to install is Python.
41
+
Aside from downloading or checking out the latest version of Python Koans, you need to install the Python interpreter.
42
42
43
-
At this time of writing there are two versions of the koans, one for use with Python 2.6 and one for Python 3.1. You should be able to work with newer Python versions, but older ones will likely give you problems.
43
+
At this time of writing, there are two versions of the Python Koans:
44
+
45
+
* one for use with Python 2.6 (it also works with Python 2.7)
46
+
* one for Python 3.1.
47
+
48
+
You should be able to work with newer Python versions, but older ones will likely give you problems.
44
49
45
50
You can download Python from here:
46
51
47
52
http://www.python.org/download
48
53
49
-
On installing Python make sure the folder containing the python executable is in the system path. In other words, you need to be able to be able to run Python from a command console. With Python 2 it will be called 'python' or 'python.exe' depending on the operating system. For Python 3 it will either be 'python3' or for windows it will be 'python.exe'.
54
+
After installing Python make sure the folder containing the python executable is in the system path. In other words, you need to be able to be able to run Python from a command console. With Python 2 it will be called 'python' or 'python.exe' depending on the operating system. For Python 3 it will either be 'python3' or for windows it will be 'python.exe'.
50
55
51
56
If you have problems, this may help:
52
57
53
58
http://www.python.org/about/gettingstarted
54
59
60
+
Windows users may also want to update the line in the batch file run.bat to set the python path:
61
+
62
+
SET PYTHON_PATH=C:\Python27
63
+
55
64
56
65
Getting Started
57
66
---------------
@@ -107,26 +116,41 @@ Quoting the Ruby Koans instructions::
107
116
moment and reflect upon the test to see what it is teaching you
108
117
and improve the code to better communicate its intent (refactor)."
109
118
119
+
110
120
Content
111
121
-------
112
122
113
-
Python is a made up of about 2/3 Ruby Koans ported material and 1/3 Python specific tests. The content ported from Ruby Koans includes all the assignment projects.
123
+
The Python Koans is a made up of about 2/3 Ruby Koans ported material and 1/3 Python specific tests. The content ported from Ruby Koans includes all the assignment projects.
114
124
115
-
Content for Python 3 is a little different to the Python 2 flavor due to big changes between the 2 different languages. For example in the Python 2 variant the differences between old and new style classes are covered. This loses relevance in in the Python 3 version, but there are some extra tests covering new functionality.
125
+
Content for Python 3 is a little different to the Python 2 flavor due to big changes between the two different versions of the language For example, in the Python 2 variant the differences between old and new style classes are covered. This loses relevance in in the Python 3 version, but there are some extra tests covering new functionality.
116
126
117
127
118
128
Finding More Koan Projects
119
129
--------------------------
120
130
121
-
Right now there are a lot of spinoff Koan projects out there for a great number of languages and frameworks. Many of them do not have that much content, but contributing to them is a great way to learn. At the moment most of them can be found by searching for 'koans' on github.
131
+
Right now there are a lot of spinoff Koan projects out there for a great number of languages and frameworks. Many of them do not have that much content, but contributing to them is a great way to learn. At the moment, most of them can be found by searching for 'koans' on github.
Thanks go to Jim Weirich and Joe O'Brien for the original Ruby Koans that Python Koans is based on! Also the Ruby Koans in turn borrows from Metakoans so thanks also go to Ara Howard for that!
153
+
Thanks go to Jim Weirich and Joe O'Brien for the original Ruby Koans that the Python Koans is based on! Also the Ruby Koans in turn borrows from Metakoans so thanks also go to Ara Howard for that!
130
154
131
155
Also thanks to everyone who helped with the Python Koans conversion! In particular I got a great headstart on the project by forking from this Python Koans startup project:
0 commit comments