sb: Update code base to support Python3 and Python2.

Fix Windows support to allow MSYS2 Python to be used.

Updates #2619.
This commit is contained in:
Chris Johns
2016-03-07 11:56:02 +11:00
parent b537e55364
commit 3a972f6102
29 changed files with 412 additions and 314 deletions

View File

@@ -17,6 +17,8 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from __future__ import print_function
#
# Various errors we can raise.
#
@@ -46,9 +48,9 @@ class exit(error):
if __name__ == '__main__':
try:
raise general('a general error')
except general, gerr:
print 'caught:', gerr
except general as gerr:
print('caught:', gerr)
try:
raise internal('an internal error')
except internal, ierr:
print 'caught:', ierr
except internal as ierr:
print('caught:', ierr)