Commit ab708739 authored by Jim Fulton's avatar Jim Fulton

Python 3 (It's like windows, but for unix)

parent 9c625540
...@@ -21,12 +21,12 @@ Some people pass buildout settings to bootstrap. ...@@ -21,12 +21,12 @@ Some people pass buildout settings to bootstrap.
... parts = ... parts =
... ''') ... ''')
>>> write('bootstrap.py', open(bootstrap_py).read()) >>> write('bootstrap.py', open(bootstrap_py).read())
>>> print 'X'; print system( >>> print_('X'); print_(system(
... zc.buildout.easy_install._safe_arg(sys.executable) + ... zc.buildout.easy_install._safe_arg(sys.executable) +
... ' bootstrap.py buildout:directory=' + top + ... ' bootstrap.py buildout:directory=' + top +
... ' -c'+join('buildout', 'buildout.cfg') ... ' -c'+join('buildout', 'buildout.cfg')
... ); print 'X' # doctest: +ELLIPSIS ... )); print_('X') # doctest: +ELLIPSIS
X X...
Creating directory '/top/bin'. Creating directory '/top/bin'.
Creating directory '/top/parts'. Creating directory '/top/parts'.
Creating directory '/top/eggs'. Creating directory '/top/eggs'.
...@@ -44,13 +44,13 @@ They might do it with init, but no worries: ...@@ -44,13 +44,13 @@ They might do it with init, but no worries:
>>> mkdir(top, 'buildout') >>> mkdir(top, 'buildout')
>>> os.chdir(top) >>> os.chdir(top)
>>> write('bootstrap.py', open(bootstrap_py).read()) >>> write('bootstrap.py', open(bootstrap_py).read())
>>> print 'X'; print system( >>> print_('X'); print_(system(
... zc.buildout.easy_install._safe_arg(sys.executable) + ... zc.buildout.easy_install._safe_arg(sys.executable) +
... ' bootstrap.py buildout:directory=' + top + ... ' bootstrap.py buildout:directory=' + top +
... ' -c'+join('buildout', 'buildout.cfg') + ... ' -c'+join('buildout', 'buildout.cfg') +
... ' init' ... ' init'
... ); print 'X' # doctest: +ELLIPSIS ... )); print_('X') # doctest: +ELLIPSIS
X X...
Creating '/top/buildout/buildout.cfg'. Creating '/top/buildout/buildout.cfg'.
Creating directory '/top/bin'. Creating directory '/top/bin'.
Creating directory '/top/parts'. Creating directory '/top/parts'.
......
...@@ -725,7 +725,9 @@ For exampe, in:: ...@@ -725,7 +725,9 @@ For exampe, in::
.. -> text .. -> text
>>> import pprint, StringIO, zc.buildout.configparser >>> try: import StringIO
... except ImportError: import io as StringIO
>>> import pprint, zc.buildout.configparser
>>> pprint.pprint(zc.buildout.configparser.parse(StringIO.StringIO( >>> pprint.pprint(zc.buildout.configparser.parse(StringIO.StringIO(
... text), 'test')) ... text), 'test'))
{'foo': {'bar': '1', 'baz': 'a\nb\nc'}} {'foo': {'bar': '1', 'baz': 'a\nb\nc'}}
......
...@@ -37,7 +37,9 @@ First, an example that illustrates a well-formed configuration:: ...@@ -37,7 +37,9 @@ First, an example that illustrates a well-formed configuration::
.. -> text .. -> text
>>> import pprint, StringIO, zc.buildout.configparser >>> try: import StringIO
... except ImportError: import io as StringIO
>>> import pprint, zc.buildout.configparser
>>> pprint.pprint(zc.buildout.configparser.parse(StringIO.StringIO( >>> pprint.pprint(zc.buildout.configparser.parse(StringIO.StringIO(
... text), 'test')) ... text), 'test'))
{'s1': {'a': '1'}, {'s1': {'a': '1'},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment