Greg Malcolm avatar Greg Malcolm committed 1ad0c10

Better... or worse?

Comments (0)

Files changed (1)

 
 Python Koans is available through git on Github:
 
-    http://wiki.github.com/gregmalcolm/python_koans
+    http://github.com/gregmalcolm/python_koans
 
 It is also mirrored on bitbucet for Mercurial users :
 
 Getting Started
 ---------------
 
-From a *nix terminal or windows command prompt go to the python koans\python_<b>VERSION</b> folder and run: 
+From a *nix terminal or windows command prompt go to the python koans\python_<b>VERSION</b> folder and run::
 
-::
     python contemplate_koans.py
 
-or
+or::
 
-::
     python3 contemplate_koans.py
 
 In my case I'm using Python 3 with windows, so I fire up my command shell (cmd.exe) and run this:
 
-::
-    C:\>cd "c:\hg\python_koans\python3"
-    C:\hg\python_koans\python3>python contemplate_koans.py
-  
-    Thinking AboutAsserts
-      test_assert_truth has damaged your karma.
+.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/GettingStarted.png
 
-    You have not yet reached enlightenment ...
-      AssertionError: False is not True
+Apparently a test failed::
 
-    Please meditate on the following code:
-      File "C:\hg\python_koans\python3\koans\about_asserts.py", line 12, in test_
-    assert_truth
-        self.assertTrue(False) # This should be true
-
-    Beautiful is better than ugly.
-    C:\hg\python_koans\python3>
-
-Apparently a test failed:
-
-::
     AssertionError: False is not True
 
 It also tells me exactly where the problem in, its an assert on line 12 of .\koans\about_asserts.py. This one is easy, just change False to True to make the test pass.
 
-Sooner or later you will likely encounter tests where you are not sure what the expected value should be. For example:
+Sooner or later you will likely encounter tests where you are not sure what the expected value should be. For example::
 
-::
     class Dog:
         pass
 
 
 This is where the Python Command Line can come in handy. in this case I can fire up the command line, recreate the scenario and run queries:
 
-::
-    C:\hg\python_koans\python3>python
-    Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on
-    win32
-    Type "help", "copyright", "credits" or "license" for more information.
-    >>> class Dog: pass
-    ...
-    >>> fido = Dog()
-    >>> isinstance(fido, object)
-    True
-    >>>
+.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/DebuggingPython.png
 
 
 Getting the Most From the Koans
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.