Index: aseba-plugin-blockly-20180211+git/convert_script_path.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/convert_script_path.py
+++ aseba-plugin-blockly-20180211+git/convert_script_path.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from bs4 import BeautifulSoup
 import sys
Index: aseba-plugin-blockly-20180211+git/blockly/build.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/build.py
+++ aseba-plugin-blockly-20180211+git/blockly/build.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3
 # Compresses the core Blockly files into a single JavaScript file.
 #
 # Copyright 2012 Google Inc.
Index: aseba-plugin-blockly-20180211+git/blockly/i18n/common.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/i18n/common.py
+++ aseba-plugin-blockly-20180211+git/blockly/i18n/common.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 # Code shared by translation conversion scripts.
 #
@@ -59,7 +59,7 @@ def read_json_file(filename):
     if '@metadata' in defs:
       del defs['@metadata']
     return defs
-  except ValueError, e:
+  except ValueError as e:
     print('Error reading ' + filename)
     raise InputError(filename, str(e))
 
@@ -85,7 +85,7 @@ def _create_qqq_file(output_dir):
     """
     qqq_file_name = os.path.join(os.curdir, output_dir, 'qqq.json')
     qqq_file = codecs.open(qqq_file_name, 'w', 'utf-8')
-    print 'Created file: ' + qqq_file_name
+    print ('Created file: ' + qqq_file_name)
     qqq_file.write('{\n')
     return qqq_file
 
@@ -126,7 +126,7 @@ def _create_lang_file(author, lang, outp
     """
     lang_file_name = os.path.join(os.curdir, output_dir, lang + '.json')
     lang_file = codecs.open(lang_file_name, 'w', 'utf-8')
-    print 'Created file: ' + lang_file_name
+    print ('Created file: ' + lang_file_name)
     # string.format doesn't like printing braces, so break up our writes.
     lang_file.write('{\n\t"@metadata": {')
     lang_file.write("""
@@ -166,7 +166,7 @@ def _create_key_file(output_dir):
     key_file_name = os.path.join(os.curdir, output_dir, 'keys.json')
     key_file = open(key_file_name, 'w')
     key_file.write('{\n')
-    print 'Created file: ' + key_file_name
+    print ('Created file: ' + key_file_name)
     return key_file
 
 
Index: aseba-plugin-blockly-20180211+git/blockly/i18n/create_messages.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/i18n/create_messages.py
+++ aseba-plugin-blockly-20180211+git/blockly/i18n/create_messages.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 # Generate .js files defining Blockly core and language messages.
 #
Index: aseba-plugin-blockly-20180211+git/blockly/i18n/dedup_json.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/i18n/dedup_json.py
+++ aseba-plugin-blockly-20180211+git/blockly/i18n/dedup_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 # Consolidates duplicate key-value pairs in a JSON file.
 # If the same key is used with different values, no warning is given,
@@ -51,7 +51,7 @@ def main():
     try:
       with codecs.open(filename, 'r', 'utf-8') as infile:
         j = json.load(infile)
-    except ValueError, e:
+    except ValueError as e:
       print('Error reading ' + filename)
       raise InputError(file, str(e))
 
Index: aseba-plugin-blockly-20180211+git/blockly/i18n/js_to_json.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/i18n/js_to_json.py
+++ aseba-plugin-blockly-20180211+git/blockly/i18n/js_to_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 # Gives the translation status of the specified apps and languages.
 #
Index: aseba-plugin-blockly-20180211+git/blockly/i18n/json_to_js.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/i18n/json_to_js.py
+++ aseba-plugin-blockly-20180211+git/blockly/i18n/json_to_js.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 # Converts .json files into .js files for use within Blockly apps.
 #
@@ -100,7 +100,7 @@ def _process_file(path_to_json, target_l
         if key != '@metadata':
             try:
                 identifier = key_dict[key]
-            except KeyError, e:
+            except KeyError as e:
                 print('Key "%s" is in %s but not in %s' %
                       (key, keyfile, args.key_file))
                 raise e
Index: aseba-plugin-blockly-20180211+git/blockly/i18n/tests.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/i18n/tests.py
+++ aseba-plugin-blockly-20180211+git/blockly/i18n/tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 # Tests of i18n scripts.
Index: aseba-plugin-blockly-20180211+git/blockly/i18n/xliff_to_json.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/blockly/i18n/xliff_to_json.py
+++ aseba-plugin-blockly-20180211+git/blockly/i18n/xliff_to_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 # Converts .xlf files into .json files for use at http://translatewiki.net.
 #
@@ -65,7 +65,7 @@ def _parse_trans_unit(trans_unit):
     try:
         result['source'] = get_value('source')
         result['target'] = get_value('target')
-    except InputError, e:
+    except InputError as e:
         raise InputError(key, e.msg)
 
     # Get notes, using the from value as key and the data as value.
@@ -112,8 +112,8 @@ def _process_file(filename):
         except IOError:
             # Don't get caught by below handler
             raise
-        except Exception, e:
-            print
+        except Exception as e:
+            print()
             raise InputError(filename, str(e))
 
         # Make sure needed fields are present and non-empty.
@@ -146,8 +146,8 @@ def _process_file(filename):
               results.append(unit)
 
         return results
-    except IOError, e:
-        print 'Error with file {0}: {1}'.format(filename, e.strerror)
+    except IOError as e:
+        print ('Error with file {0}: {1}'.format(filename, e.strerror))
         sys.exit(1)
 
 
Index: aseba-plugin-blockly-20180211+git/closure-library/closure/bin/scopify.py
===================================================================
--- aseba-plugin-blockly-20180211+git.orig/closure-library/closure/bin/scopify.py
+++ aseba-plugin-blockly-20180211+git/closure-library/closure/bin/scopify.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 #
 # Copyright 2010 The Closure Library Authors. All Rights Reserved.
 #
