[Checkins] SVN: zc.buildout/branches/python-3-2/src/zc/buildout/ rewrote remaining print calls to give the same output in Python 2 and 3
Thomas Lotze
tl at gocept.com
Thu Apr 7 08:24:04 EDT 2011
Log message for revision 121327:
rewrote remaining print calls to give the same output in Python 2 and 3
Changed:
U zc.buildout/branches/python-3-2/src/zc/buildout/buildout.py
U zc.buildout/branches/python-3-2/src/zc/buildout/buildout.txt
U zc.buildout/branches/python-3-2/src/zc/buildout/update.txt
-=-
Modified: zc.buildout/branches/python-3-2/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/python-3-2/src/zc/buildout/buildout.py 2011-04-07 09:38:56 UTC (rev 121326)
+++ zc.buildout/branches/python-3-2/src/zc/buildout/buildout.py 2011-04-07 12:24:03 UTC (rev 121327)
@@ -85,11 +85,11 @@
def _print_annotate(data):
sections = list(data)
sections.sort()
- print()
+ print('')
print("Annotated sections")
print("="*len("Annotated sections"))
for section in sections:
- print()
+ print('')
print('[%s]' % section)
keys = list(data[section])
keys.sort()
@@ -104,9 +104,9 @@
elif note == '[-]':
line = '-= '
else:
- print(line, note)
+ print('%s %s' % (line, note))
line = ' '
- print()
+ print('')
def _unannotate_section(section):
@@ -478,11 +478,11 @@
if self._log_level < logging.DEBUG:
sections = list(self)
sections.sort()
- print()
+ print('')
print('Configuration data:')
for section in self._data:
_save_options(section, self[section], sys.stdout)
- print()
+ print('')
# compute new part recipe signatures
self._compute_part_signatures(install_parts)
Modified: zc.buildout/branches/python-3-2/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/python-3-2/src/zc/buildout/buildout.txt 2011-04-07 09:38:56 UTC (rev 121326)
+++ zc.buildout/branches/python-3-2/src/zc/buildout/buildout.txt 2011-04-07 12:24:03 UTC (rev 121327)
@@ -812,7 +812,7 @@
... items = list(self.options.items())
... items.sort()
... for option, value in items:
- ... print(option, value)
+ ... print('%s %s' % (option, value))
... return ()
...
... update = install
@@ -2728,9 +2728,9 @@
>>> write(sample_bootstrapped, 'demo', 'demo.py',
... """
... def ext(buildout):
- ... print('ext', list(buildout))
+ ... print('ext %s' % list(buildout))
... def unload(buildout):
- ... print('unload', list(buildout))
+ ... print('unload %s' % list(buildout))
... """)
>>> write(sample_bootstrapped, 'demo', 'setup.py',
Modified: zc.buildout/branches/python-3-2/src/zc/buildout/update.txt
===================================================================
--- zc.buildout/branches/python-3-2/src/zc/buildout/update.txt 2011-04-07 09:38:56 UTC (rev 121326)
+++ zc.buildout/branches/python-3-2/src/zc/buildout/update.txt 2011-04-07 12:24:03 UTC (rev 121327)
@@ -44,7 +44,7 @@
... def install(self):
... for project in 'zc.buildout', 'setuptools':
... req = pkg_resources.Requirement.parse(project)
- ... print(project, pkg_resources.working_set.find(req).version)
+ ... print('%s %s' % (project, pkg_resources.working_set.find(req).version))
... return ()
... update = install
... """)
More information about the checkins
mailing list