[Checkins] SVN: zc.buildout/branches/regebro-python3/ Remade loads of prints in doctests.

Lennart Regebro regebro at gmail.com
Sun Nov 21 16:54:53 EST 2010


Log message for revision 118519:
  Remade loads of prints in doctests.
  

Changed:
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/allowhosts.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/bootstrap.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/debugging.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/dependencylinks.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/downloadcache.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/extends-cache.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/pycompat.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/setup.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt
  U   zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt
  U   zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt

-=-
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/allowhosts.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/allowhosts.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/allowhosts.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -55,7 +55,7 @@
 
 Now we can run the buildout and make sure all attempts to dist.plone.org fails::
 
-    >>> print(system(buildout)) # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/allowdemo'
     ...
     Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
@@ -88,7 +88,7 @@
 
 Now we can run the buildout and make sure all attempts to dist.plone.org fails::
 
-    >>> print(system(buildout)) # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/allowdemo'
     ...
     Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
@@ -115,7 +115,7 @@
     ... eggs=zc.buildout
     ... interpreter=python
     ... ''')
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Unused options for buildout: 'foo'.
     Installing python.
     Generated script '/sample-buildout/bin/buildout'.

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/bootstrap.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/bootstrap.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/bootstrap.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -20,7 +20,7 @@
     ... parts =
     ... ''')
     >>> write('bootstrap.py', open(bootstrap_py).read())
-    >>> print('X'); print(system(
+    >>> print('X'); bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py')); print('X') # doctest: +ELLIPSIS
     X...
@@ -115,7 +115,7 @@
 The buildout script remembers the decision to accept early releases, and
 alerts the user.
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     ... # doctest: +NORMALIZE_WHITESPACE
     NOTE: Accepting early releases of build system packages.  Rerun bootstrap
           without --accept-buildout-test-releases (-t) to return to default
@@ -153,7 +153,7 @@
 
 Let's try with an unknown version::
 
-    >>> print('XX'); print(system(
+    >>> print('XX'); bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --version UNKNOWN')); print('X') # doctest: +ELLIPSIS
     ... 
@@ -163,7 +163,7 @@
 
 Now let's try with `1.1.2`, which happens to exist::
 
-    >>> print('X'); print(system(
+    >>> print('X'); bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --version 1.1.2')); print('X')
     ... 
@@ -192,7 +192,7 @@
 
 Let's try with `1.2.1`::
 
-    >>> print('X'); print(system(
+    >>> print('X'); bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --version 1.2.1')); print('X') # doctest: +ELLIPSIS
     ... 
@@ -221,7 +221,7 @@
 ``zc.buildout`` now can also run with `Distribute` with the `--distribute`
 option::
 
-    >>> print('X'); print(system(
+    >>> print('X'); bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --distribute')); print('X') # doctest: +ELLIPSIS
     ... 
@@ -241,7 +241,7 @@
 
 Make sure both options can be used together::
 
-    >>> print('X'); print(system(
+    >>> print('X'); bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --distribute --version 1.2.1')); print('X')
     ... # doctest: +ELLIPSIS
@@ -275,7 +275,7 @@
     >>> f = open(conf_file, 'w')
     >>> f.write('[buildout]\nparts=\n\n')
     >>> f.close()
-    >>> print('X'); print(system(
+    >>> print('X'); bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py -c %s --distribute' % conf_file)); print('X') # doctest: +ELLIPSIS
     ... 
@@ -294,7 +294,7 @@
     ...     pprint.pprint(kwargs, width=40)
     ...     sys.exit()
     ... ''')
-    >>> print(system(
+    >>> bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --setup-source=./ez_setup.py'))
     ... # doctest: +ELLIPSIS
@@ -305,7 +305,7 @@
 You can also pass a download-cache, and a place in which eggs should be stored
 (they are normally stored in a temporary directory).
 
-    >>> print(system(
+    >>> bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --setup-source=./ez_setup.py '+
     ...     '--download-base=./download-cache --eggs=eggs'))
@@ -317,9 +317,9 @@
 
 Here's the entire help text.
 
-    >>> print(system(
+    >>> bprint(system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
-    ...     'bootstrap.py --help'), end=' ')
+    ...     'bootstrap.py --help'))
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     Usage: [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
     <BLANKLINE>

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py	2010-11-21 21:54:53 UTC (rev 118519)
@@ -1020,12 +1020,13 @@
         fd, tsetup = tempfile.mkstemp()
         exe = zc.buildout.easy_install._safe_arg(sys.executable)
         try:
-            os.write(fd, zc.buildout.easy_install.runsetup_template % dict(
+            data = zc.buildout.easy_install.runsetup_template % dict(
                 setuptools=pkg_resources_loc,
                 setupdir=os.path.dirname(setup),
                 setup=setup,
                 __file__ = setup,
-                ))
+            )
+            os.write(fd, data.encode())
             if is_jython:
                 arg_list = list()
 

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -91,7 +91,6 @@
     >>> cat(sample_buildout, 'buildout.cfg')
     [buildout]
     parts =
-    <BLANKLINE>
     
 A part is simply something to be created by a buildout.  It can be
 almost anything, such as a Python package, a program, a directory, or
@@ -290,7 +289,7 @@
     >>> import os
     >>> os.chdir(sample_buildout)
     >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing data-dir.
     data-dir: Creating directory mystuff
@@ -339,7 +338,7 @@
     ... path = mydata
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling data-dir.
     Installing data-dir.
@@ -359,7 +358,7 @@
 the part will be reinstalled:
 
     >>> rmdir(sample_buildout, 'mydata')
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling data-dir.
     Installing data-dir.
@@ -390,7 +389,7 @@
 
 We'll get a user error, not a traceback.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     data-dir: Cannot create /xxx/mydata. /xxx is not a directory.
     While:
@@ -455,7 +454,7 @@
     ... path = foo bin
     ... """)
 
-    >>> print(system(buildout), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/recipes'
     Uninstalling data-dir.
     Installing data-dir.
@@ -489,7 +488,7 @@
     ... path = foo bins
     ... """)
 
-    >>> print(system(buildout), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/recipes'
     Installing data-dir.
     data-dir: Creating directory foo
@@ -565,7 +564,7 @@
 
 When we rerun the buildout:
 
-    >>> print(system(buildout), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/recipes'
     Installing data-dir.
     data-dir: Creating directory foo
@@ -646,7 +645,7 @@
 If we rerun the buildout, again, we'll get the error and no
 directories will be created:
 
-    >>> print(system(buildout), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/recipes'
     Installing data-dir.
     data-dir: Creating directory foo
@@ -676,7 +675,7 @@
     ... path = foo bins
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing data-dir.
     data-dir: Creating directory foo
@@ -723,7 +722,7 @@
 the origin of the value (file name or COMPUTED_VALUE, DEFAULT_VALUE,
 COMMAND_LINE_VALUE).
 
-    >>> print(system(buildout+ ' annotate'), end=' ')
+    >>> bprint(system(buildout+ ' annotate'))
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     <BLANKLINE>
     Annotated sections
@@ -868,7 +867,7 @@
 Now, if we run the buildout, we'll see the options with the values
 substituted.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling data-dir.
     Installing data-dir.
@@ -887,7 +886,7 @@
 recipe, so it assumed it could and reinstalled mydata.  If we rerun
 the buildout:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating data-dir.
     Updating debug.
@@ -926,7 +925,7 @@
     ... path = mydata
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Updating data-dir.
@@ -964,7 +963,7 @@
 
 It will still be treated as a part:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Updating data-dir.
@@ -1003,7 +1002,7 @@
 
 It will still be treated as a part:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating data-dir.
     Updating debug.
@@ -1052,7 +1051,7 @@
     ... path = mydata
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Uninstalling data-dir.
@@ -1168,7 +1167,7 @@
     ... """)
 
     >>> os.chdir(sample_buildout)
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     Develop: '/sample-buildout/demo'
     Uninstalling myfiles.
     Getting distribution for 'recipes'.
@@ -1186,14 +1185,14 @@
     ... extends = extension2.cfg
     ... """)
 
-    >>> print(system(os.path.join('bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join('bin', 'buildout')))
     ['a1 a2/na3 a4/na5', 'b1 b2 b3 b4', 'c1 c2/nc3 c4 c5', 'h1 h2']
     Develop: '/sample-buildout/demo'
 
 Annotated sections output shows which files are responsible for which
 operations.
 
-    >>> print(system(os.path.join('bin', 'buildout') + ' annotate'), end=' ')
+    >>> bprint(system(os.path.join('bin', 'buildout') + ' annotate'))
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     <BLANKLINE>
     Annotated sections
@@ -1269,7 +1268,7 @@
     ... op = base
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing debug.
     op buildout
@@ -1339,7 +1338,7 @@
     ... name = base
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing debug.
@@ -1401,7 +1400,7 @@
     ... """ % dict(url=server_url))
 
 
-    >>> print(system(buildout+ ' -c client.cfg'), end=' ')
+    >>> bprint(system(buildout+ ' -c client.cfg'), )
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing debug.
@@ -1432,7 +1431,7 @@
     ... name = remote
     ... """)
 
-    >>> print(system(buildout + ' -c ' + server_url + '/remote.cfg'), end=' ')
+    >>> bprint(system(buildout + ' -c ' + server_url + '/remote.cfg'), )
     While:
       Initializing.
     Error: Missing option: buildout:directory
@@ -1442,10 +1441,10 @@
 files loaded from URLs.  In this case, the buildout directory would
 normally be defined on the command line:
 
-    >>> print(system(buildout
+    >>> bprint(system(buildout
     ...              + ' -c ' + server_url + '/remote.cfg'
     ...              + ' buildout:directory=' + sample_buildout
-    ...              ), end=' ')
+    ...              ), )
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing debug.
@@ -1474,7 +1473,7 @@
     ... """)
 
     >>> os.environ['HOME'] = home
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing debug.
@@ -1491,7 +1490,7 @@
 A buildout command-line argument, -U, can be used to suppress reading
 user defaults:
 
-    >>> print(system(buildout + ' -U'), end=' ')
+    >>> bprint(system(buildout + ' -U'))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing debug.
@@ -1520,7 +1519,7 @@
     ... extends = b1.cfg b2.cfg
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     name base
     op1 b1 1
     op2 b2 2
@@ -1610,7 +1609,7 @@
 
 When the buildout is run the service will be installed
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing service.
@@ -1620,7 +1619,7 @@
 The service has been installed. If the buildout is run again with no
 changes, the service shouldn't be changed.
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating service.
     <BLANKLINE>
@@ -1639,7 +1638,7 @@
     ... script = /path/to/a/different/script
     ... """)
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling service.
     Running uninstall recipe.
@@ -1660,7 +1659,7 @@
     ... recipe = recipes:debug
     ... """)
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling service.
     Running uninstall recipe.
@@ -1727,7 +1726,7 @@
 
 Run the buildout to install the part.
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing dir.
@@ -1751,7 +1750,7 @@
 When the buildout is run the part is removed, and the uninstall recipe
 is run before the directory is deleted.
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling dir.
     Running uninstall recipe.
@@ -1856,7 +1855,7 @@
 Note that we used the installed buildout option to specify an
 alternate file to store information about installed parts.
 
-    >>> print(system(buildout+' -c other.cfg debug:op1=foo -v'), end=' ')
+    >>> bprint(system(buildout+' -c other.cfg debug:op1=foo -v'), )
     Develop: '/sample-buildout/recipes'
     Installing debug.
     name other
@@ -1869,7 +1868,7 @@
 
 Options can also be combined in the usual Unix way, as in:
 
-    >>> print(system(buildout+' -vcother.cfg debug:op1=foo'), end=' ')
+    >>> bprint(system(buildout+' -vcother.cfg debug:op1=foo'), )
     Develop: '/sample-buildout/recipes'
     Updating debug.
     name other
@@ -1910,7 +1909,7 @@
     ... recipe = recipes:debug
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling debug.
     Installing debug.
@@ -1994,7 +1993,7 @@
 
 and run the buildout specifying just d3 and d4:
 
-    >>> print(system(buildout+' install d3 d4'), end=' ')
+    >>> bprint(system(buildout+' install d3 d4'), )
     Develop: '/sample-buildout/recipes'
     Uninstalling d3.
     Installing d3.
@@ -2065,7 +2064,7 @@
 
 Now, if we run the buildout without the install command:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling d2.
     Uninstalling d1.
@@ -2122,7 +2121,7 @@
     ...    work = os.path.join(alt, 'work'),
     ... ))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Creating directory '/sample-alt/scripts'.
     Creating directory '/sample-alt/work'.
     Creating directory '/sample-alt/basket'.
@@ -2158,7 +2157,7 @@
     ...    recipes=os.path.join(sample_buildout, 'recipes'),
     ...    ))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Creating directory '/sample-alt/bin'.
     Creating directory '/sample-alt/parts'.
     Creating directory '/sample-alt/eggs'.
@@ -2210,7 +2209,7 @@
 configuration file.  Because the verbosity is subtracted from the log
 level, we get a final log level of 20, which is the INFO level.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     INFO Develop: '/sample-buildout/recipes'
 
 Predefined buildout options
@@ -2228,7 +2227,7 @@
     ... parts =
     ... """)
 
-    >>> print(system(buildout+' -vv'), end=' ') # doctest: +NORMALIZE_WHITESPACE
+    >>> bprint(system(buildout+' -vv'), ) # doctest: +NORMALIZE_WHITESPACE
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout X.X.
     We have the best distribution that satisfies 'setuptools'.
@@ -2411,9 +2410,9 @@
 
     >>> sample_bootstrapped = tmpdir('sample-bootstrapped')
 
-    >>> print(system(buildout
+    >>> bprint(system(buildout
     ...              +' -c'+os.path.join(sample_bootstrapped, 'setup.cfg')
-    ...              +' init'), end=' ')
+    ...              +' init'), )
     Creating '/sample-bootstrapped/setup.cfg'.
     Creating directory '/sample-bootstrapped/bin'.
     Creating directory '/sample-bootstrapped/parts'.
@@ -2452,9 +2451,9 @@
     ... parts =
     ... ''')
 
-    >>> print(system(buildout
+    >>> bprint(system(buildout
     ...              +' -c'+os.path.join(sample_bootstrapped, 'setup.cfg')
-    ...              +' bootstrap'), end=' ')
+    ...              +' bootstrap'), )
     Generated script '/sample-bootstrapped/bin/buildout'.
 
     >>> buildout_script = join(sample_bootstrapped, 'bin', 'buildout')
@@ -2501,9 +2500,9 @@
 
     >>> sample_bootstrapped2 = tmpdir('sample-bootstrapped2')
 
-    >>> print(system(buildout
+    >>> bprint(system(buildout
     ...              +' -c'+os.path.join(sample_bootstrapped2, 'setup.cfg')
-    ...              +' bootstrap'), end=' ')
+    ...              +' bootstrap'), )
     While:
       Initializing.
     Error: Couldn't open /sample-bootstrapped2/setup.cfg
@@ -2514,9 +2513,9 @@
     ... parts =
     ... """)
 
-    >>> print(system(buildout
+    >>> bprint(system(buildout
     ...              +' -c'+os.path.join(sample_bootstrapped2, 'setup.cfg')
-    ...              +' bootstrap'), end=' ')
+    ...              +' bootstrap'), )
     Creating directory '/sample-bootstrapped2/bin'.
     Creating directory '/sample-bootstrapped2/parts'.
     Creating directory '/sample-bootstrapped2/eggs'.
@@ -2654,7 +2653,7 @@
     ... recipe = recipes:debug
     ... """)
 
-    >>> print(system(buildout+' buildout:installed=inst.cfg'), end=' ')
+    >>> bprint(system(buildout+' buildout:installed=inst.cfg'), )
     Develop: '/sample-buildout/recipes'
     Installing debug.
     recipe recipes:debug
@@ -2676,7 +2675,7 @@
 buildout installed option:
 
     >>> os.remove('inst.cfg')
-    >>> print(system(buildout+' buildout:installed='), end=' ')
+    >>> bprint(system(buildout+' buildout:installed='), )
     Develop: '/sample-buildout/recipes'
     Installing debug.
     recipe recipes:debug
@@ -2702,7 +2701,7 @@
     ... parts =
     ... """)
 
-    >>> print(system(buildout+' buildout:installed=inst.cfg'), end=' ')
+    >>> bprint(system(buildout+' buildout:installed=inst.cfg'), )
 
     >>> ls(sample_buildout)
     -  b1.cfg
@@ -2771,7 +2770,7 @@
     ... """)
 
     >>> os.chdir(sample_bootstrapped)
-    >>> print(system(os.path.join(sample_bootstrapped, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_bootstrapped, 'bin', 'buildout')), )
     Develop: '/sample-bootstrapped/demo'
 
 Now we can add the extensions option.  We were a bit tricky and ran
@@ -2791,7 +2790,7 @@
 
 We see that our extension is loaded and executed:
 
-    >>> print(system(os.path.join(sample_bootstrapped, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_bootstrapped, 'bin', 'buildout')), )
     ext ['buildout']
     Develop: '/sample-bootstrapped/demo'
     unload ['buildout']

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/debugging.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/debugging.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/debugging.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -56,7 +56,7 @@
 
 If we run the buildout, we'll get an error:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing data-dir.
     While:
@@ -67,11 +67,12 @@
 If we want to debug the error, we can add the -D option. Here's we'll
 supply some input:
 
-    >>> print(system(buildout+" -D", """\
+    >>> bprint(system(buildout+" -D", """\
     ... up
     ... p self.options.keys()
     ... q
-    ... """), end=' ')
+    ... """))
+    ... # doctest: +ELLIPSIS
     Develop: '/sample-buildout/recipes'
     Installing data-dir.
     > /zc/buildout/buildout.py(925)__getitem__()
@@ -92,7 +93,7 @@
         directory = self.options['directory']
       File "/zc/buildout/buildout.py", line 925, in __getitem__
         raise MissingOption("Missing option: %s:%s" % (self.name, key))
-    MissingOption: Missing option: data-dir:directory
+    ...MissingOption: Missing option: data-dir:directory
     <BLANKLINE>
     Starting pdb:
 

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/dependencylinks.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/dependencylinks.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/dependencylinks.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -54,7 +54,7 @@
 
 Now we can run the buildout.
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     GET 200 /
     GET 200 /demoneeded-1.2c1.zip
     Develop: '/sample-buildout/depdemo'
@@ -83,7 +83,7 @@
     ...     for egg in glob(join(sample_buildout, 'eggs', 'demoneeded*.egg')):
     ...         remove(sample_buildout, 'eggs', egg)
     >>> remove_demoneeded_egg()
-    >>> print(system(buildout)) # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/depdemo'
     ...
     Getting distribution for 'demoneeded'.
@@ -111,7 +111,7 @@
     ... eggs = depdemo
     ... ''' % link_server)
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/depdemo'
     Installing eggs.
     Getting distribution for 'demoneeded'.
@@ -133,7 +133,7 @@
     ... '''  % link_server2)
 
     >>> remove_demoneeded_egg()
-    >>> print(system(buildout)) #doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) #doctest: +ELLIPSIS
     GET 200 /...
     Develop: '/sample-buildout/depdemo'
     Updating eggs.
@@ -165,7 +165,7 @@
     ... ''' % link_server)
 
     >>> remove_demoneeded_egg()
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/depdemo'
     Updating eggs.
     Getting distribution for 'demoneeded'.
@@ -190,7 +190,7 @@
     ... eggs = depdemo
     ... ''' % link_server)
     >>> remove_demoneeded_egg()
-    >>> print(system(buildout)) #doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) #doctest: +ELLIPSIS
     GET 200 /...
     Develop: '/sample-buildout/depdemo'
     Updating eggs.

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/downloadcache.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/downloadcache.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/downloadcache.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -31,7 +31,7 @@
 We specified a link server that has some distributions available for
 download:
 
-    >>> print(get(link_server), end=' ')
+    >>> bprint(get(link_server))
     <html><body>
     <a href="bigdemo-0.1-py2.4.egg">bigdemo-0.1-py2.4.egg</a><br>
     <a href="demo-0.1-py2.4.egg">demo-0.1-py2.4.egg</a><br>
@@ -58,7 +58,7 @@
 If we run the buildout, we'll see the eggs installed from the link
 server as usual:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     GET 200 /
     GET 200 /demo-0.2-py2.4.egg
     GET 200 /demoneeded-1.2c1.zip
@@ -88,7 +88,7 @@
     ...     if f.startswith('demo'):
     ...         remove('eggs', f)
    
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     GET 200 /
     Updating eggs.
     Getting distribution for 'demo==0.2'.
@@ -131,7 +131,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling eggs.
     Installing eggs.
     Getting distribution for 'demo'.

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -107,7 +107,7 @@
 
 We have a link server that has a number of eggs:
 
-    >>> print(get(link_server), end=' ')
+    >>> bprint(get(link_server))
     <html><body>
     <a href="bigdemo-0.1-py2.4.egg">bigdemo-0.1-py2.4.egg</a><br>
     <a href="demo-0.1-py2.4.egg">demo-0.1-py2.4.egg</a><br>
@@ -788,17 +788,17 @@
     ... print(sys.argv)
     ... print(__name__, __file__, __doc__)
     ... ''')
-    >>> print(system(join(bin, 'py')+' ascript a b c'), end=' ')
+    >>> bprint(system(join(bin, 'py')+' ascript a b c'), )
     ['ascript', 'a', 'b', 'c']
     ('__main__', 'ascript', 'demo doc')
 
 For Python 2.5 and higher, you can also use the -m option to run a
 module:
 
-    >>> print(system(join(bin, 'py')+' -m pdb'), end=' ')
+    >>> bprint(system(join(bin, 'py')+' -m pdb'), )
     usage: pdb.py scriptfile [arg] ...
 
-    >>> print(system(join(bin, 'py')+' -m pdb what'), end=' ')
+    >>> bprint(system(join(bin, 'py')+' -m pdb what'), )
     Error: what does not exist
 
 An additional argument can be passed to define which scripts to install
@@ -818,7 +818,7 @@
     >>> ls(bin)
     -  run
 
-    >>> print(system(os.path.join(bin, 'run')), end=' ')
+    >>> bprint(system(os.path.join(bin, 'run')), )
     3 1
 
 The ``scripts`` function: Including extra paths in scripts
@@ -948,7 +948,7 @@
 
 Of course, running the script works:
 
-    >>> print(system(join(bo, 'bin', 'run')), end=' ')
+    >>> bprint(system(join(bo, 'bin', 'run')), )
     3 1
 
 We specified an interpreter and its paths are adjusted too:
@@ -1523,7 +1523,7 @@
     >>> demo_call = join(interpreter_bin_dir, 'demo')
     >>> if sys.platform == 'win32':
     ...     demo_call = '"%s"' % demo_call
-    >>> print(system(demo_call))
+    >>> bprint(system(demo_call))
     3 1
     <BLANKLINE>
 
@@ -1680,7 +1680,7 @@
 Let's update our link server with a new version of extdemo:
 
     >>> update_extdemo()
-    >>> print(get(link_server), end=' ')
+    >>> bprint(get(link_server))
     <html><body>
     <a href="bigdemo-0.1-py2.4.egg">bigdemo-0.1-py2.4.egg</a><br>
     <a href="demo-0.1-py2.4.egg">demo-0.1-py2.4.egg</a><br>

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/extends-cache.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/extends-cache.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/extends-cache.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -41,20 +41,20 @@
 When trying to run this buildout offline, we'll find that we cannot read all
 of the required configuration:
 
->>> print(system(buildout + ' -o'))
+>>> bprint(system(buildout + ' -o'))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base.cfg' in offline mode.
 
 Trying the same online, we can:
 
->>> print(system(buildout))
+>>> bprint(system(buildout))
 Unused options for buildout: 'foo'.
 
 As long as we haven't said anything about caching downloaded configuration,
 nothing gets cached. Offline mode will still cause the buildout to fail:
 
->>> print(system(buildout + ' -o'))
+>>> bprint(system(buildout + ' -o'))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base.cfg' in offline mode.
@@ -73,7 +73,7 @@
 ... extends-cache = cache
 ... """ % server_url)
 
->>> print(system(buildout))
+>>> bprint(system(buildout))
 Unused options for buildout: 'foo'.
 
 >>> cache = join(sample_buildout, 'cache')
@@ -88,7 +88,7 @@
 
 We can now run buildout offline as it will read base.cfg from the cache:
 
->>> print(system(buildout + ' -o'))
+>>> bprint(system(buildout + ' -o'))
 Unused options for buildout: 'foo'.
 
 The cache is being used purely as a fall-back in case we are offline or don't
@@ -104,18 +104,18 @@
 ... bar = baz
 ... """)
 
->>> print(system(buildout + ' -o'))
+>>> bprint(system(buildout + ' -o'))
 Unused options for buildout: 'foo'.
 
 In online mode, buildout will download and use the modified version:
 
->>> print(system(buildout))
+>>> bprint(system(buildout))
 Unused options for buildout: 'bar'.
 
 Trying offline mode again, the new version will be used as it has been put in
 the cache now:
 
->>> print(system(buildout + ' -o'))
+>>> bprint(system(buildout + ' -o'))
 Unused options for buildout: 'bar'.
 
 Clean up:
@@ -203,7 +203,7 @@
 Buildout will now assemble its configuration from all of these 6 files,
 defaults first. The online resources end up in the respective extends caches:
 
->>> print(system(buildout))
+>>> bprint(system(buildout))
 Unused options for buildout: 'foo'.
 
 >>> ls('user-cache')
@@ -249,7 +249,7 @@
 >>> remove('user-cache', os.listdir('user-cache')[0])
 >>> remove('cache', os.listdir('cache')[0])
 
->>> print(system(buildout))
+>>> bprint(system(buildout))
 Unused options for buildout: 'foo'.
 
 >>> ls('user-cache')
@@ -272,7 +272,7 @@
 If we run buildout in offline mode now, it will fail because it cannot get at
 the remote configuration file needed by the user's defaults:
 
->>> print(system(buildout + ' -o'))
+>>> bprint(system(buildout + ' -o'))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base_default.cfg' in offline mode.
@@ -285,7 +285,7 @@
 ... extends = fancy_default.cfg
 ... offline = true
 ... """)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base_default.cfg' in offline mode.
@@ -299,7 +299,7 @@
 ... extends = %sbase_default.cfg
 ... offline = true
 ... """ % server_url)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base.cfg' in offline mode.
@@ -313,7 +313,7 @@
 ... extends = fancy.cfg
 ... offline = true
 ... """)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base.cfg' in offline mode.
@@ -327,7 +327,7 @@
 ... extends = %sbase.cfg
 ... offline = true
 ... """ % server_url)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 Unused options for buildout: 'foo'.
 
 The ``install-from-cache`` option is treated accordingly:
@@ -337,7 +337,7 @@
 ... extends = fancy_default.cfg
 ... install-from-cache = true
 ... """)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base_default.cfg' in offline mode.
@@ -351,7 +351,7 @@
 ... extends = %sbase_default.cfg
 ... install-from-cache = true
 ... """ % server_url)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base.cfg' in offline mode.
@@ -365,7 +365,7 @@
 ... extends = fancy.cfg
 ... install-from-cache = true
 ... """)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 While:
   Initializing.
 Error: Couldn't download 'http://localhost/base.cfg' in offline mode.
@@ -379,7 +379,7 @@
 ... extends = %sbase.cfg
 ... install-from-cache = true
 ... """ % server_url)
->>> print(system(buildout))
+>>> bprint(system(buildout))
 While:
   Installing.
   Checking for upgrades.

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/pycompat.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/pycompat.py	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/pycompat.py	2010-11-21 21:54:53 UTC (rev 118519)
@@ -3,9 +3,20 @@
 
 import sys
 if sys.version < '3':
-    def b(x):
-        return x
+    def b(data):
+        """Take a string literal and makes sure it's binary"""
+        return data
+    
 else:
     import codecs
-    def b(x):
-        return codecs.latin_1_encode(x)[0]
+    def b(data):
+        """Take a string literal and makes sure it's binary"""
+        return codecs.latin_1_encode(data)[0]
+
+def bprint(data):
+    """Takes input that may or may not be binary, and prints it, after
+       stripping any whitespace. Useful in doctests.
+    """
+    if not isinstance(data, str):
+        data = data.decode()
+    print(data.strip())

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -39,7 +39,7 @@
 
     >>> write('recipe', 'README', '')
 
-    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup recipe bdist_egg')) # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 
@@ -64,7 +64,7 @@
     ... ''')
 
 
-    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup recipe bdist_egg')) # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 
@@ -82,7 +82,7 @@
 
 If we run the buildout, it will use version 2:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Getting distribution for 'spam'.
     Got spam 2.
     Installing foo.
@@ -112,7 +112,7 @@
 
 Now, if we run the buildout, we'll use version 1 of the spam recipe:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Getting distribution for 'spam==1'.
     Got spam 1.
     Uninstalling foo.
@@ -123,7 +123,7 @@
 about versions used. If we run the buildout in verbose mode without
 specifying a versions section:
 
-    >>> print(system(buildout+' buildout:versions= -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' buildout:versions= -v')) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout 1.0.0.
     We have the best distribution that satisfies 'setuptools'.
@@ -145,7 +145,7 @@
 
 If we run the buildout with the versions section:
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v')) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout 1.0.0.
     We have the best distribution that satisfies 'setuptools'.

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -32,7 +32,7 @@
   
 We can use the buildout command to generate the hello egg:
 
-    >>> print(system(buildout +' setup hello -q bdist_egg'), end=' ')
+    >>> bprint(system(buildout +' setup hello -q bdist_egg'))
     Running setup script 'hello/setup.py'.
     zip_safe flag not set; analyzing archive contents...
 

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/setup.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/setup.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/setup.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -28,14 +28,14 @@
 doesn't import setuptools.  Let's try running it to create an egg.
 We'll use the buildout script from our sample buildout:
 
-    >>> print(system(buildout+' setup'), end=' ')
+    >>> bprint(system(buildout+' setup'))
     ... # doctest: +NORMALIZE_WHITESPACE
     Error: The setup command requires the path to a setup script or
     directory containing a setup script, and its arguments.
 
 Oops, we forgot to give the name of the setup script:
 
-    >>> print(system(buildout+' setup setup.py bdist_egg'), end=' ')
+    >>> bprint(system(buildout+' setup setup.py bdist_egg'))
     ... # doctest: +ELLIPSIS
     Running setup script 'setup.py'.
     ...
@@ -46,7 +46,7 @@
 Note that we can specify a directory name.  This is often shorter and
 preferred by the lazy :)
 
-    >>> print(system(buildout+' setup . bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup . bdist_egg')) # doctest: +ELLIPSIS
     Running setup script './setup.py'.
     ...
 

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py	2010-11-21 21:54:53 UTC (rev 118519)
@@ -35,6 +35,7 @@
 
 import zc.buildout.buildout
 import zc.buildout.easy_install
+from zc.buildout.pycompat import b
 from zc.buildout.rmtree import rmtree
 
 fsync = getattr(os, 'fsync', lambda fileno: None)
@@ -50,7 +51,7 @@
         and os.path.exists(path+'-script.py')
         ):
         path = path+'-script.py'
-    print(open(path).read(), end=' ')
+    print(open(path).read().strip())
 
 def ls(dir, *subs):
     if subs:
@@ -103,7 +104,7 @@
                          )
     i, o, e = (p.stdin, p.stdout, p.stderr)
     if input:
-        i.write(input)
+        i.write(b(input))
     i.close()
     result = o.read() + e.read()
     o.close()
@@ -403,7 +404,8 @@
         start_server = start_server,
         buildout = os.path.join(sample, 'bin', 'buildout'),
         wait_until = wait_until,
-        make_py = make_py
+        make_py = make_py,
+        bprint = zc.buildout.pycompat.bprint,
         ))
 
 def buildoutTearDown(test):

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py	2010-11-21 21:54:53 UTC (rev 118519)
@@ -48,7 +48,7 @@
     ... parts =
     ... ''')
 
-    >>> print(system(join('bin', 'buildout')))
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/foo'
 
     >>> ls('develop-eggs')
@@ -76,7 +76,7 @@
     ... parts =
     ... ''')
 
-    >>> print(system(join('bin', 'buildout')+' -vv'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(join('bin', 'buildout')+' -vv'), ) # doctest: +ELLIPSIS
     Installing...
     Develop: '/sample-buildout/foo'
     ...
@@ -88,7 +88,7 @@
     -  z3c.recipe.scripts.egg-link
     -  zc.recipe.egg.egg-link
 
-    >>> print(system(join('bin', 'buildout')+' -vvv'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(join('bin', 'buildout')+' -vvv'), ) # doctest: +ELLIPSIS
     Installing...
     Develop: '/sample-buildout/foo'
     in: '/sample-buildout/foo'
@@ -129,7 +129,7 @@
     ... z = ${buildout:x}
     ... ''')
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     ... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     While:
       Initializing.
@@ -151,7 +151,7 @@
     ... x = ${bui$ldout:y}
     ... ''')
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     While:
       Initializing.
       Getting section buildout.
@@ -168,7 +168,7 @@
     ... x = ${buildout:y{z}
     ... ''')
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     While:
       Initializing.
       Getting section buildout.
@@ -187,7 +187,7 @@
     ... x = ${parts}
     ... ''')
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     While:
       Initializing.
       Getting section buildout.
@@ -204,7 +204,7 @@
     ... x = ${buildout:y:z}
     ... ''')
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     While:
       Initializing.
       Getting section buildout.
@@ -221,7 +221,7 @@
     ... parts = x
     ... ''')
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     While:
       Installing.
       Getting section x.
@@ -239,7 +239,7 @@
     ... foo = 1
     ... ''')
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')))
     While:
       Installing.
     Error: Missing option: x:recipe
@@ -288,7 +288,7 @@
     ...        samplez
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/sampley'
     Develop: '/sample-buildout/samplez'
     Installing eggs.
@@ -321,7 +321,7 @@
 
 If we use the verbose switch, we can see where requirements are coming from:
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout 1.0.0
     We have the best distribution that satisfies 'setuptools'.
@@ -372,7 +372,7 @@
     ... eggs = samplea
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/sampley'
     Develop: '/sample-buildout/samplea'
     Develop: '/sample-buildout/sampleb'
@@ -420,7 +420,7 @@
 indicate the eggs from site-packages that have been selected.  You'll see
 we have two: demo 0.3 and demoneeded 1.1.
 
-    >>> print(system(buildout+" -v"), end=' ')
+    >>> bprint(system(buildout+" -v"), )
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout V
     We have the best distribution that satisfies 'setuptools'.
@@ -506,14 +506,14 @@
     >>> os.chdir(sample_buildout)
     >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing debug.
 
 If we run the buildout again, we shoudn't get a message about
 uninstalling anything because the configuration hasn't changed.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating debug.
 """
@@ -587,7 +587,7 @@
     ... parts =
     ... ''')
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/demo'
 
     >>> import zc.buildout.easy_install
@@ -597,7 +597,7 @@
     ...      ['demo'], ws, sys.executable, 'bin'))
     True
 
-    >>> print(system(join('bin', 'demo')), end=' ')
+    >>> bprint(system(join('bin', 'demo')), )
     Python 2.5
 
 Now, finally, let's test _get_version:
@@ -616,7 +616,7 @@
     ... x = ${foo:bar}
     ... ''')
 
-    >>> print(system(buildout + ' foo:bar=1 -vv'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout + ' foo:bar=1 -vv'), ) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     [foo]
@@ -627,7 +627,7 @@
 
 def test_help():
     """
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')+' -h'), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')+' -h'), )
     ... # doctest: +ELLIPSIS
     Usage: buildout [options] [assignments] [command [command arguments]]
     <BLANKLINE>
@@ -636,8 +636,8 @@
       -h, --help
     ...
 
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
-    ...              +' --help'), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')
+    ...              +' --help'), )
     ... # doctest: +ELLIPSIS
     Usage: buildout [options] [assignments] [command [command arguments]]
     <BLANKLINE>
@@ -663,8 +663,8 @@
     ... ''')
 
     >>> os.chdir(d)
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
-    ...              + ' bootstrap'), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')
+    ...              + ' bootstrap'), )
     Creating directory '/sample-bootstrap/bin'.
     Creating directory '/sample-bootstrap/parts'.
     Creating directory '/sample-bootstrap/eggs'.
@@ -690,15 +690,15 @@
     ... ''')
 
     >>> os.chdir(d)
-    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
-    ...              + ' bootstrap'), end=' ')
+    >>> bprint(system(os.path.join(sample_buildout, 'bin', 'buildout')
+    ...              + ' bootstrap'), )
     Creating directory '/sample-bootstrap/bin'.
     Creating directory '/sample-bootstrap/parts'.
     Creating directory '/sample-bootstrap/eggs'.
     Creating directory '/sample-bootstrap/develop-eggs'.
     Generated script '/sample-bootstrap/bin/buildout'.
 
-    >>> print(system(os.path.join('bin', 'buildout')), end=' ')
+    >>> bprint(system(os.path.join('bin', 'buildout')))
     Unused options for buildout: 'scripts' 'eggs'.
 
     """
@@ -722,7 +722,7 @@
     ... parts =
     ... """)
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/foo'
 
     >>> ls('develop-eggs')
@@ -745,7 +745,7 @@
     ... parts =
     ... """)
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/foo'
     Develop: '/sample-buildout/bar'
 
@@ -763,7 +763,7 @@
     ... develop = bar
     ... parts =
     ... """)
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/bar'
 
 It is gone
@@ -780,7 +780,7 @@
     ... [buildout]
     ... parts =
     ... """)
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
 
 All gone
 
@@ -826,7 +826,7 @@
     ... parts =
     ... """)
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/foo'
 
 Now, if we generate a working set using the egg link, we will get a warning
@@ -878,7 +878,7 @@
     ...     ])]
     ['foox', 'setuptools']
 
-    >>> print(handler, end=' ')
+    >>> print(handler, )
 
 We get the same behavior if the it is a depedency that uses a
 namespace package.
@@ -899,7 +899,7 @@
     ... parts =
     ... """)
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/foo'
     Develop: '/sample-buildout/bar'
 
@@ -911,7 +911,7 @@
     ...     ])]
     ['bar', 'foox', 'setuptools']
 
-    >>> print(handler, end=' ')
+    >>> print(handler, )
     zc.buildout.easy_install WARNING
       Develop distribution: foox 0.0.0
     uses namespace packages but the distribution does not require setuptools.
@@ -1000,7 +1000,7 @@
     ... recipe = recipes:demo
     ... ''')
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/recipes'
     Installing demo.
     installing
@@ -1015,7 +1015,7 @@
     ... x = 1
     ... ''')
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/recipes'
     Uninstalling demo.
     Running uninstall recipe.
@@ -1030,7 +1030,7 @@
     ... parts =
     ... ''')
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/recipes'
     Uninstalling demo.
     Running uninstall recipe.
@@ -1070,7 +1070,7 @@
     ... offline = true
     ... """)
 
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')), )
     ext ['buildout']
 
 
@@ -1108,20 +1108,20 @@
     ... ''')
 
 
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')), )
     Develop: '/sample-buildout/recipe'
     Installing foo.
 
     >>> mkdir('recipe', '.svn')
     >>> mkdir('recipe', 'CVS')
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')), )
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
     >>> write('recipe', '.svn', 'x', '1')
     >>> write('recipe', 'CVS', 'x', '1')
 
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')), )
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
@@ -1160,7 +1160,7 @@
     ... ''')
 
 
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')), )
     Develop: '/sample-buildout/recipe'
     Installing foo.
 
@@ -1177,7 +1177,7 @@
 
     >>> remove('recipe', 'some-file')
 
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')), )
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
@@ -1185,7 +1185,7 @@
 
 def o_option_sets_offline():
     """
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')+' -vvo'), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')+' -vvo'), )
     ... # doctest: +ELLIPSIS
     <BLANKLINE>
     ...
@@ -1221,7 +1221,7 @@
 
     >>> write('recipe', 'README', '')
 
-    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup recipe bdist_egg'), ) # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 
@@ -1239,7 +1239,7 @@
     ... recipe = recipe
     ... ''' % join('recipe', 'dist'))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Getting distribution for 'recipe'.
     Got recipe 1.
     Installing foo.
@@ -1266,25 +1266,25 @@
     ... ''')
 
 
-    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup recipe bdist_egg'), ) # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 
 We won't get the update if we specify -N:
 
-    >>> print(system(buildout+' -N'), end=' ')
+    >>> bprint(system(buildout+' -N'))
     Updating foo.
     recipe v1
 
 or if we use -o:
 
-    >>> print(system(buildout+' -o'), end=' ')
+    >>> bprint(system(buildout+' -o'))
     Updating foo.
     recipe v1
 
 But we will if we use neither of these:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Getting distribution for 'recipe'.
     Got recipe 2.
     Uninstalling foo.
@@ -1303,7 +1303,7 @@
     ... recipe = recipe ==1
     ... ''' % join('recipe', 'dist'))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling foo.
     Installing foo.
     recipe v1
@@ -1352,11 +1352,11 @@
     ... recipe = recipe
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipe'
     Installing foo.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
@@ -1434,7 +1434,7 @@
     ... recipe = recipes:mkdir
     ... ''')
 
-    >>> print(system(buildout), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/recipes'
     While:
       Installing.
@@ -1486,7 +1486,7 @@
     ... z = 1
     ... """)
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/.'
     Unused options for buildout: 'a'.
     Installing foo.
@@ -1554,19 +1554,19 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing p1.
     Installing p2.
     Installing p3.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating p1.
     Updating p2.
     Installing p3.
 
-    >>> print(system(buildout+' buildout:parts='), end=' ')
+    >>> bprint(system(buildout+' buildout:parts='), )
     Develop: '/sample-buildout/recipes'
     Uninstalling p2.
     Uninstalling p1.
@@ -1592,20 +1592,20 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing p1.
     Installing p2.
     Installing p3.
     Installing p4.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating p1.
     Updating p2.
     Updating p3.
 
-    >>> print(system(buildout+' buildout:parts='), end=' ')
+    >>> bprint(system(buildout+' buildout:parts='), )
     Develop: '/sample-buildout/recipes'
     Uninstalling p2.
     Uninstalling p1.
@@ -1633,7 +1633,7 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Installing p1.
     Installing p2.
@@ -1660,7 +1660,7 @@
     ... x = 1
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling p4.
     Updating p1.
@@ -1684,7 +1684,7 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling p1.
     Installing p1.
@@ -1717,7 +1717,7 @@
     ...     zip_safe=False)
     ... ''')
 
-    >>> print(system(buildout+' setup badegg sdist'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup badegg sdist'), ) # doctest: +ELLIPSIS
     Running setup script 'badegg/setup.py'.
     ...
 
@@ -1739,7 +1739,7 @@
     ... scripts = buildout=bo
     ... ''' % globals())
 
-    >>> print(system(buildout));print('X') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout));print('X') # doctest: +ELLIPSIS
     Installing eggs.
     Getting distribution for 'badegg'.
     Got badegg 1.
@@ -1801,7 +1801,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing x.
     Getting distribution for 'demo'.
     Got demo 0.4c1.
@@ -1809,7 +1809,7 @@
     Got demoneeded 1.2c1.
     Generated script '/sample-buildout/bin/demo'.
 
-    >>> print(system(join('bin', 'demo')), end=' ')
+    >>> bprint(system(join('bin', 'demo')), )
     4 2
 
     >>> write('buildout.cfg',
@@ -1823,14 +1823,14 @@
     ... eggs = demo ==0.1
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling x.
     Installing x.
     Getting distribution for 'demo==0.1'.
     Got demo 0.1.
     Generated script '/sample-buildout/bin/demo'.
 
-    >>> print(system(join('bin', 'demo')), end=' ')
+    >>> bprint(system(join('bin', 'demo')), )
     1 2
     """
 
@@ -1923,7 +1923,7 @@
     ...     print(tellmy.fortune.__version__)
     ... ''' % globals())
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Installing eggs.
     Getting distribution for 'tellmy.version==1.0'.
     Got tellmy.version 1.0.
@@ -1959,7 +1959,7 @@
     1.0
     1.0...
 
-    >>> print(system(join('bin', 'demo')))
+    >>> bprint(system(join('bin', 'demo')))
     1.0
     1.0
     4 2
@@ -2055,7 +2055,7 @@
 the comment leading up to zc.buildout.easy_install._easy_install_cmd).
 Now the install works correctly, as seen here.
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Installing eggs.
     Getting distribution for 'tellmy.version==1.1'.
     Got tellmy.version 1.1.
@@ -2382,7 +2382,7 @@
 
 This works for the script.
 
-    >>> print(system(join(interpreter_bin_dir, 'demo')))
+    >>> bprint(system(join(interpreter_bin_dir, 'demo')))
     3
     <BLANKLINE>
 
@@ -2411,7 +2411,7 @@
 You can also see, actually more easily than in the other example, that we
 have the desired eggs available.
 
-    >>> print(system(join(interpreter_bin_dir, 'demo')), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(join(interpreter_bin_dir, 'demo')), ) # doctest: +ELLIPSIS
     ['',
      '/interpreter/parts/interpreter',
      '/sample-buildout/foo',
@@ -2421,7 +2421,7 @@
 
 This also works for the generated interpreter, with identical results.
 
-    >>> print(call_py(join(interpreter_bin_dir, 'py'), test), end=' ')
+    >>> print(call_py(join(interpreter_bin_dir, 'py'), test), )
     ... # doctest: +ELLIPSIS
     ['',
      '/interpreter/parts/interpreter',
@@ -2514,7 +2514,7 @@
 
 Now, it is handled smoothly.
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Getting distribution for 'demoneeded==1.2c1'.
     Got demoneeded 1.2c1.
@@ -2575,7 +2575,7 @@
 
 Now we actually run the buildout.
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/ns'
     Develop: '/sample-buildout/recipes'
     Uninstalling dummy.
@@ -2691,8 +2691,8 @@
     ... ''')
 
     >>> os.chdir('bad_start')
-    >>> print(system(join(sample_buildout, 'bin', 'buildout')
-    ...              +' -c '+join(sample_buildout, 'buildout.cfg')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'buildout')
+    ...              +' -c '+join(sample_buildout, 'buildout.cfg')), )
     Develop: '/sample-buildout/.'
     /sample-buildout
     /sample-buildout
@@ -2734,7 +2734,7 @@
 def bug_75607_buildout_should_not_run_if_it_creates_an_empty_buildout_cfg():
     """
     >>> remove('buildout.cfg')
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     While:
       Initializing.
     Error: Couldn't open /sample-buildout/buildout.cfg
@@ -2775,7 +2775,7 @@
     ... eggs = pack0
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/pack0'
     Develop: '/sample-buildout/pack1'
     Develop: '/sample-buildout/pack2'
@@ -2791,7 +2791,7 @@
 
     However, if we run in verbose mode, we can see why packages were included:
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout 1.0.0
     We have the best distribution that satisfies 'setuptools'.
@@ -2856,7 +2856,7 @@
     ...             },
     ...       )
     ... ''')
-    >>> print(system(buildout+' setup '+src+' bdist_egg'), end=' ')
+    >>> bprint(system(buildout+' setup '+src+' bdist_egg'), )
     ... # doctest: +ELLIPSIS
     Running setup ...
     creating 'dist/wackyextension-1-...
@@ -2880,7 +2880,7 @@
 When we run the buildout. it will load the extension from the dist
 directory and then use the wacky extension to load the demo package
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Getting distribution for 'wackyextension'.
     Got wackyextension 1.
     Installing demo.
@@ -2902,7 +2902,7 @@
     ... setup(name='foo')
     ... ''')
 
-    >>> print(system(buildout+' setup test bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup test bdist_egg'), ) # doctest: +ELLIPSIS
     Running setup script 'test/setup.py'.
     ...
 
@@ -3082,7 +3082,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     Picked: demo = 0.4c1
@@ -3104,7 +3104,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     Picked: demo = 0.4c1
@@ -3126,7 +3126,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     Picked: demo = 0.3
@@ -3147,7 +3147,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     While:
       Initializing.
     Error: Invalid value for prefer-final option: no
@@ -3181,7 +3181,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing ...
     Picked: demoextension = 1.0
     ...
@@ -3205,7 +3205,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing ...
     Picked: demoextension = 1.0
     ...
@@ -3227,7 +3227,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     Installing ...
     Picked: demoextension = 1.1b1
     ...
@@ -3248,7 +3248,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' -v'), ) # doctest: +ELLIPSIS
     While:
       Initializing.
     Error: Invalid value for accept-buildout-test-releases option: no
@@ -3278,7 +3278,7 @@
     ... parts =
     ... ''')
 
-    >>> print(system(join('bin', 'buildout')), end=' ')
+    >>> bprint(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/foo'
 
     >>> ls('develop-eggs')
@@ -3329,7 +3329,7 @@
     ...         pkg_resources.Requirement.parse('setuptools')).version,
     ...        distribute_version))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing foo.
     Getting distribution for 'foo==1'.
     Got foo 1.
@@ -3361,7 +3361,7 @@
     ... print(eggrecipedemoneeded.f.func_code.co_filename)
     ... ''')
 
-    >>> print(system(join('bin', 'py')+ ' t.py'), end=' ')
+    >>> bprint(system(join('bin', 'py')+ ' t.py'), )
     /sample-buildout/eggs/demo-0.4c1-py2.4.egg/eggrecipedemo.py
     /sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg/eggrecipedemoneeded.py
 
@@ -3384,7 +3384,7 @@
     ... eggs-directory = ${buildout:directory}/develop-eggs
     ... parts =
     ... ''' % globals())
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
 
     """
 
@@ -3415,7 +3415,7 @@
 
     We can see that both eggs were found:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/sampley'
     Develop: '/sample-buildout/samplez'
     Installing eggs.
@@ -3447,7 +3447,7 @@
     We should get one of the eggs, and a warning for the pattern that
     did not match anything.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/samplea'
     Couldn't develop '/sample-buildout/grumble*' (not found)
     Installing eggs.
@@ -3502,7 +3502,7 @@
     ... <= p1
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing p1.
       foo='1\n2 b'
       recipe='zc.buildout:debug'
@@ -3542,7 +3542,7 @@
     ... x = ${buildout:bar-option} ${buildout:foo-option}
     ... ''')
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing p.
       recipe='zc.buildout:debug'
       x='bar\nbaz foo\nham'
@@ -3569,7 +3569,7 @@
     ... <= p1
     ... ''')
 
-    >>> print(system(buildout+' buildout:parts+=p2 p1:foo+=bar'), end=' ')
+    >>> bprint(system(buildout+' buildout:parts+=p2 p1:foo+=bar'))
     Installing p1.
       foo='1 a\nb\nbar'
       recipe='zc.buildout:debug'
@@ -3892,6 +3892,8 @@
     zc.buildout.testing.buildoutSetUp(test)
     new_releases = test.globs['tmpdir']('new_releases')
     test.globs['new_releases'] = new_releases
+    #test.globs['bprint'] = zc.buildout.pycompat.bprint
+    
     ws = getWorkingSetWithBuildoutEgg(test)
     # now let's make the new releases
     makeNewRelease('zc.buildout', ws, new_releases)

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -64,7 +64,7 @@
 Now if we run the buildout, the buildout will upgrade itself to the
 new versions found in new releases:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Getting distribution for 'zc.buildout'.
     Got zc.buildout 99.99.
     Getting distribution for 'setuptools'.
@@ -140,7 +140,7 @@
 
 Now we can see that we actually "upgrade" to an earlier version.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Upgraded:
       zc.buildout version 1.0.0,
       setuptools version 0.6;
@@ -167,7 +167,7 @@
     ... recipe = showversions
     ... """ % dict(new_releases=new_releases))
 
-    >>> print(system(buildout+' -o'), end=' ')
+    >>> bprint(system(buildout+' -o'))
     Develop: '/sample-buildout/showversions'
     Updating show-versions.
     zc.buildout 1.0.0
@@ -175,7 +175,7 @@
 
 Or in non-newest mode:
 
-    >>> print(system(buildout+' -N'), end=' ')
+    >>> bprint(system(buildout+' -N'))
     Develop: '/sample-buildout/showversions'
     Updating show-versions.
     zc.buildout 1.0.0
@@ -195,7 +195,7 @@
     ... """ % dict(new_releases=new_releases))
 
     >>> cd(sample_buildout2)
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Creating directory '/sample_buildout2/bin'.
     Creating directory '/sample_buildout2/parts'.
     Creating directory '/sample_buildout2/eggs'.
@@ -230,8 +230,8 @@
     ... recipe = showversions
     ... """ % dict(new_releases=new_releases))
 
-    >>> print(system(buildout +
-    ...              ' buildout:accept-buildout-test-releases=true'), end=' ')
+    >>> bprint(system(buildout +
+    ...              ' buildout:accept-buildout-test-releases=true'), )
     ... # doctest: +NORMALIZE_WHITESPACE
     Getting distribution for 'zc.buildout'.
     Got zc.buildout 100.0b1.

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -157,7 +157,7 @@
     ... parts =
     ... ''')
     >>> write('bootstrap.py', open(bootstrap_py).read())
-    >>> print('X'); print(system(
+    >>> print('X'); bprint(system(
     ...     _safe_arg(py_path)+' '+
     ...     'bootstrap.py')); print('X') # doctest: +ELLIPSIS
     X...
@@ -208,7 +208,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
+    >>> bprint(system(buildout)) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     Installing eggs.
     Getting distribution for 'demo'.
     Got demo 0.4c1.
@@ -232,12 +232,12 @@
 you don't want those warnings for those particular recipes that use the
 new features, you can use the "-s" option to squelch the warnings.
 
-    >>> print(system(buildout + ' -s'), end=' ')
+    >>> bprint(system(buildout + ' -s'))
     Updating eggs.
 
 A lower verbosity (one or more -q options) also quiets the warning.
 
-    >>> print(system(buildout + ' -q'), end=' ')
+    >>> bprint(system(buildout + ' -q'))
 
 Notice that, as we saw before with bin/buildout, the generated scripts
 are old-style, because the new-style feature gracefully degrades to the

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -43,7 +43,7 @@
 
     >>> write('recipe', 'README', '')
 
-    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> bprint(system(buildout+' setup recipe bdist_egg')) # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 
@@ -59,7 +59,7 @@
     ... recipe = spam
     ... ''' % join('recipe', 'dist'))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Getting distribution for 'spam'.
     Got spam 1.
     Installing foo.

Modified: zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt
===================================================================
--- zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -111,7 +111,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing demo.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -119,7 +119,7 @@
     Got demoneeded 1.2c1.
     Generated script '/sample-buildout/bin/demo'.
 
-    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'demo')))
     2 2
 
 Interpreter generation
@@ -142,7 +142,7 @@
     ... interpreter = py
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -163,7 +163,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
@@ -198,7 +198,7 @@
 
 Here's an example of using the generated interpreter.
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
     ...              ' -c "import sys, pprint; pprint.pprint(sys.path[-2:])"'))
     ['/sample-buildout/eggs/demo-0.2-pyN.N.egg',
      '/sample-buildout/eggs/demoneeded-1.2c1-pyN.N.egg']
@@ -264,14 +264,14 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling py.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
 Now executable_buildout/site-packages is included in sys.path.
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
     ...              ''' -c "import sys, pprint; pprint.pprint(sys.path)"'''))
     ... # doctest: +ELLIPSIS
     ['',
@@ -300,12 +300,12 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling py.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
     ...              ''' -c "import sys, pprint; pprint.pprint(sys.path)"'''))
     ... # doctest: +ELLIPSIS
     ['',
@@ -359,7 +359,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Creating directory '/sample-buildout/tmpeggs'.
     Uninstalling py.
     Installing eggs.
@@ -387,7 +387,7 @@
     ... allowed-eggs-from-site-packages =
     ... eggs = demoneeded
     ... ''' % globals())
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Creating directory '/sample-buildout/tmpeggs'.
     Uninstalling eggs.
     Installing eggs.
@@ -426,7 +426,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing eggs.
 
    This fails:
@@ -449,7 +449,7 @@
     ... python = primed_python
     ... eggs = demoneeded
     ... ''' % globals())
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Creating directory '/sample-buildout/tmpeggs'.
     Uninstalling eggs.
     Installing eggs.
@@ -483,7 +483,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
@@ -496,7 +496,7 @@
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
     ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''))
     foo bar baz shazam
     <BLANKLINE>
@@ -520,7 +520,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Updating py.
 
     >>> cat(sample_buildout, 'parts', 'py', 'sitecustomize.py')
@@ -532,7 +532,7 @@
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
     ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''))
     foo bar baz shazam
     <BLANKLINE>
@@ -573,20 +573,20 @@
 
 Now let's put it in action.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling py.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
     Installing python.
     Generated interpreter '/sample-buildout/bin/python'.
 
-    >>> print(system(join(sample_buildout, 'bin', 'python') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'python') +
     ...              ' -c "import sys, pprint; pprint.pprint(sys.path[-2:])"'))
     ['/sample-buildout/eggs/demo-0.2-pyN.N.egg',
      '/sample-buildout/eggs/demoneeded-1.2c1-pyN.N.egg']
     <BLANKLINE>
-    >>> print(system(join(sample_buildout, 'bin', 'python') +
-    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'python') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), )
     foo bar baz shazam
 
 Note that the parts/py directory has been cleaned up, and parts/python has
@@ -615,18 +615,18 @@
     ...     print("Hi from the script")
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling python.
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
     Generated interpreter '/sample-buildout/bin/py'.
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "print('Hi from the interpreter')"'''), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "print('Hi from the interpreter')"'''))
     Hi from the interpreter
 
-    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'demo')))
     Hi from the script
     2 2
 
@@ -646,12 +646,12 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing interpreter.
     Generated interpreter '/sample-buildout/bin/python2'.
 
-    >>> print(system(join(sample_buildout, 'bin', 'python2') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'python2') +
     ...              ' -c "print(42)"'))
     42
     <BLANKLINE>

Modified: zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
===================================================================
--- zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-11-21 21:54:53 UTC (rev 118519)
@@ -1,4 +1,4 @@
-##############################################################################
+###############################################################################
 #
 # Copyright (c) 2006 Zope Corporation and Contributors.
 # All Rights Reserved.
@@ -56,7 +56,7 @@
     ... python = custom_python
     ... ''' % dict(server=link_server, py_path=py_path))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing py.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -64,8 +64,8 @@
     Got demoneeded 1.2c1.
     Generated interpreter '/sample-buildout/bin/py'.
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), )
     foo bar baz shazam
 """
 
@@ -93,10 +93,10 @@
     ...    ${buildout:directory}/spam
     ... ''' % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
     ...              ''' -c "import sys;print('path' + ' '.join(sys.path))"'''))
     ... # doctest:+ELLIPSIS
     path.../foo/bar /sample-buildout/spam...
@@ -123,7 +123,7 @@
     ... index = %(server)s/index
     ... ''' % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing py.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -136,8 +136,8 @@
     <BLANKLINE>
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), )
     foo bar baz shazam
 
 This also works with the exec-sitecustomize option, processing local
@@ -169,7 +169,7 @@
     ... python = custom_python
     ... ''' % dict(server=link_server, py_path=py_path))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling py.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
@@ -186,11 +186,11 @@
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
 
-    >>> print(system(join(sample_buildout, 'bin', 'py') + ' -c ' +
-    ...              '''"import os; print(os.environ['zc.recipe.egg'])"'''), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') + ' -c ' +
+    ...              '''"import os; print(os.environ['zc.recipe.egg'])"'''), )
     baLOOba
-    >>> print(system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), )
     foo bar baz shazam
 
 """
@@ -216,7 +216,7 @@
     ...    ${buildout:directory}/spam
     ... ''' % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
@@ -274,7 +274,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing eggs.
 
 You can set the value false explicitly.  This makes it possible to
@@ -296,7 +296,7 @@
     ... python = primed_python
     ... eggs = demoneeded
     ... ''' % globals())
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Uninstalling eggs.
     Installing eggs.
     Couldn't find index page for 'demoneeded' (maybe misspelled?)
@@ -321,7 +321,7 @@
     ... eggs = other
     ... ''' % globals())
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     While:
       Installing.
       Getting section eggs.
@@ -363,7 +363,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Installing eggs.
     <BLANKLINE>
 
@@ -389,7 +389,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print(system(buildout))
+    >>> bprint(system(buildout))
     Uninstalling eggs.
     Installing eggs.
     <BLANKLINE>

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -31,7 +31,7 @@
 
 We have a link server that has a number of distributions:
 
-    >>> print(get(link_server), end=' ')
+    >>> bprint(get(link_server))
     <html><body>
     <a href="bigdemo-0.1-py2.3.egg">bigdemo-0.1-py2.3.egg</a><br>
     <a href="demo-0.1-py2.3.egg">demo-0.1-py2.3.egg</a><br>
@@ -67,7 +67,7 @@
 Let's run the buildout:
 
     >>> import os
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing demo.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -111,7 +111,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -193,7 +193,7 @@
 specification. We were able to do this because the scripts recipe is
 the default entry point for the zc.recipe.egg egg.
 
-   >>> print(system(buildout), end=' ')
+   >>> bprint(system(buildout))
    Uninstalling demo.
    Installing demo.
    Generated script '/sample-buildout/bin/demo'.
@@ -210,7 +210,7 @@
 
 If we run the demo script, it prints out some minimal data:
 
-    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'demo')))
     2 2
 
 The value it prints out happens to be some values defined in the
@@ -219,13 +219,13 @@
 We can also run the py-demo script.  Here we'll just print out
 the bits if the path added to reflect the eggs:
 
-    >>> print(system(join(sample_buildout, 'bin', 'py-demo'),
+    >>> bprint(system(join(sample_buildout, 'bin', 'py-demo'),
     ... """import os, sys
     ... for p in sys.path:
     ...     if 'demo' in p:
     ...         print(os.path.basename(p))
     ... 
-    ... """).replace('>>> ', '').replace('... ', ''), end=' ')
+    ... """).replace('>>> ', '').replace('... ', ''), )
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     demo-0.2-py2.4.egg
     demoneeded-1.2c1-py2.4.egg
@@ -251,7 +251,7 @@
 
 and run the buildout in non-newest mode:
 
-    >>> print(system(buildout+' -N'), end=' ')
+    >>> bprint(system(buildout+' -N'))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -262,7 +262,7 @@
 
 We'll also run the buildout in off-line mode:
 
-    >>> print(system(buildout+' -o'), end=' ')
+    >>> bprint(system(buildout+' -o'))
     Updating demo.
 
 We didn't get an update for demo:
@@ -276,7 +276,7 @@
 If we run the buildout on the default online and newest modes,
 we'll get an update for demo:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Updating demo.
     Getting distribution for 'demo'.
     Got demo 0.4c1.
@@ -293,7 +293,7 @@
 
 The script is updated too:
 
-    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
+    >>> bprint(system(join(sample_buildout, 'bin', 'demo')))
     4 2
 
 Controlling script generation
@@ -316,7 +316,7 @@
     ... """ % dict(server=link_server))
 
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
 
@@ -337,7 +337,7 @@
     ... scripts = demo=foo
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -367,7 +367,7 @@
     ...    ${buildout:directory}/spam
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -414,7 +414,7 @@
     ...    ${buildout:directory}/spam
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -463,7 +463,7 @@
     ...    ${buildout:directory}/spam
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -516,7 +516,7 @@
     ... arguments = a, 2
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -566,7 +566,7 @@
     ... entry-points = alt=eggrecipedemo:alt other=foo.bar:a.b.c
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -613,7 +613,7 @@
     ... index = %(server)s/index
     ... dependent-scripts = true
     ... """ % dict(server=link_server))
-    >>> print(system(buildout+' -N'), end=' ')
+    >>> bprint(system(buildout+' -N'))
     Uninstalling demo.
     Installing bigdemo.
     Getting distribution for 'bigdemo'.
@@ -638,7 +638,7 @@
     ... scripts = demo=foo
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Uninstalling bigdemo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -81,7 +81,7 @@
     >>> import os
     >>> os.chdir(sample_buildout)
     >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
-    >>> print(system(buildout + ' -q'), end=' ')
+    >>> bprint(system(buildout + ' -q'))
     Part: sample-part
     Egg requirements:
     demo<0.3
@@ -141,7 +141,7 @@
 Then we'll see that reflected in the extra_paths attribute in the egg
 recipe instance:
 
-    >>> print(system(buildout + ' -q'), end=' ')
+    >>> bprint(system(buildout + ' -q'))
     Part: sample-part
     Egg requirements:
     demo<0.3

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -137,7 +137,7 @@
     ...
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Installing extdemo.
     zip_safe flag not set; analyzing archive contents...
 
@@ -194,7 +194,7 @@
     ... entry-points = demo=demo:main
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     Installing demo.
@@ -202,7 +202,7 @@
 
 When we run the script, we'll 42 printed:
 
-    >>> print(system(join('bin', 'demo')), end=' ')
+    >>> bprint(system(join('bin', 'demo')), )
     42
 
 Updating
@@ -217,12 +217,12 @@
 
 If we run the buildout in non-newest or offline modes:
 
-    >>> print(system(buildout+' -N'), end=' ')
+    >>> bprint(system(buildout+' -N'))
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     Updating demo.
 
-    >>> print(system(buildout+' -o'), end=' ')
+    >>> bprint(system(buildout+' -o'))
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     Updating demo.
@@ -239,7 +239,7 @@
 will. This time we also get the test-variable message again, because the new
 version is imported:
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     zip_safe flag not set; analyzing archive contents...
@@ -278,7 +278,7 @@
     ... entry-points = demo=demo:main
     ... """ % dict(server=link_server))
 
-    >>> print(system(buildout+' -D'), end=' ')
+    >>> bprint(system(buildout+' -D'), )
     Develop: '/sample-buildout/demo'
     Uninstalling demo.
     Uninstalling extdemo.
@@ -355,7 +355,7 @@
     ... recipe = recipes:environ
     ...
     ... """ % dict(server=link_server))
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling demo.
     Uninstalling extdemo.
@@ -375,7 +375,7 @@
 
     >>> import os
     >>> os.environ['test-variable'] = 'bar'
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating extdemo.
     Updating checkenv.
@@ -409,7 +409,7 @@
     ... recipe = recipes:environ
     ...
     ... """ % dict(server=link_server))
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling extdemo.
     Installing extdemo.
@@ -438,7 +438,7 @@
     ... include-dirs = include
     ...
     ... """ % dict(server=link_server))
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Uninstalling checkenv.
     Uninstalling extdemo.
@@ -545,7 +545,7 @@
 TWO to be defined.  This will cause the module-variable, 'val', to be
 set with a value of 2.
 
-    >>> print(system(buildout), end=' ')
+    >>> bprint(system(buildout))
     Develop: '/sample-buildout/demo'
     Uninstalling extdemo.
     Installing extdemo.
@@ -575,6 +575,6 @@
 Because develop eggs take precedence over non-develop eggs, the demo
 script will use the new develop egg:
 
-    >>> print(system(join('bin', 'demo')), end=' ')
+    >>> bprint(system(join('bin', 'demo')), )
     2
 

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt	2010-11-21 17:16:47 UTC (rev 118518)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt	2010-11-21 21:54:53 UTC (rev 118519)
@@ -50,7 +50,7 @@
    >>> import os
    >>> os.chdir(sample_buildout)
    >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
-   >>> print(system(buildout))
+   >>> bprint(system(buildout))
    Installing demo.
    Getting distribution for 'demo<0.3'.
    Got demo 0.2.



More information about the checkins mailing list