Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

Commit

Permalink
[tools] Change default python interpreter of scripts to Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mhthies committed Nov 19, 2017
1 parent c69e47d commit 94fe8bf
Show file tree
Hide file tree
Showing 68 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion scons/site_tools/arm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2011, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/avr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/avrdude.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/bitmap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/black_magic_probe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# Copyright (c) 2016, Roboterclub Aachen e. V.
# All Rights Reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/configfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/dfu_stm32_programmer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All Rights Reserved.
#
Expand Down
4 changes: 2 additions & 2 deletions scons/site_tools/font.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2011, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down Expand Up @@ -37,7 +37,7 @@ def font_action(target, source, env):
infile = str(source[0])
outfile = os.path.splitext(str(target[0]))[0]

os.system('python2 "%s" "%s" "%s"' % (command, infile, outfile))
os.system('python3 "%s" "%s" "%s"' % (command, infile, outfile))

def font_string(target, source, env):
return "Create Font: '%s'" % (str(source[0]))
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/gcc_windows.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/gdb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2012, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/git.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/hosted.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/logger_tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/lpclink.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2012, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/openocd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/openocd_remote.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2014, Roboterclub Aachen e.V.
# All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/platform_tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/qtcreator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/stlink.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
12 changes: 6 additions & 6 deletions scons/site_tools/system_design.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down Expand Up @@ -140,7 +140,7 @@ def generate(env, **kw):
env['BUILDERS']['SystemCppPackets'] = \
SCons.Script.Builder(
action = SCons.Action.Action(
'python "${XPCC_SYSTEM_BUILDER}/cpp_packets.py" ' \
'python3 "${XPCC_SYSTEM_BUILDER}/cpp_packets.py" ' \
'--source_path ${TARGETS[0].dir} ' \
'--header_path ${TARGETS[1].dir} ' \
'--dtdpath "${dtdPath}" ' \
Expand All @@ -156,7 +156,7 @@ def generate(env, **kw):
env['BUILDERS']['SystemCppIdentifier'] = \
SCons.Script.Builder(
action = SCons.Action.Action(
'python "${XPCC_SYSTEM_BUILDER}/cpp_identifier.py" ' \
'python3 "${XPCC_SYSTEM_BUILDER}/cpp_identifier.py" ' \
'--outpath ${TARGET.dir} ' \
'--dtdpath "${dtdPath}" ' \
'--namespace "${namespace}" ' \
Expand All @@ -171,7 +171,7 @@ def generate(env, **kw):
env['BUILDERS']['SystemCppPostman'] = \
SCons.Script.Builder(
action = SCons.Action.Action(
'python "${XPCC_SYSTEM_BUILDER}/cpp_postman.py" ' \
'python3 "${XPCC_SYSTEM_BUILDER}/cpp_postman.py" ' \
'--container "${container}" ' \
'--outpath ${TARGET.dir} ' \
'--dtdpath "${dtdPath}" ' \
Expand All @@ -187,7 +187,7 @@ def generate(env, **kw):
env['BUILDERS']['SystemCppCommunication'] = \
SCons.Script.Builder(
action = SCons.Action.Action(
'python "${XPCC_SYSTEM_BUILDER}/cpp_communication.py" ' \
'python3 "${XPCC_SYSTEM_BUILDER}/cpp_communication.py" ' \
'--outpath ${TARGET.dir} ' \
'--dtdpath "${dtdPath}" ' \
'--namespace "${namespace}" ' \
Expand All @@ -202,7 +202,7 @@ def generate(env, **kw):
env['BUILDERS']['SystemCppXpccTaskCaller'] = \
SCons.Script.Builder(
action = SCons.Action.Action(
'python "${XPCC_SYSTEM_BUILDER}/cpp_xpcc_task_caller.py" ' \
'python3 "${XPCC_SYSTEM_BUILDER}/cpp_xpcc_task_caller.py" ' \
'--outpath ${TARGET.dir} ' \
'--dtdpath "${dtdPath}" ' \
'--namespace "${namespace}" ' \
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/template.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/unittest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scons/site_tools/xpcc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion tools/authors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Niklas Hauser
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion tools/bootloader/avr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Usage:
3) Create the configuration using this tool.
Select the GPIO number (e.g. 19) and the active level (--low or --high) of your GPIO.
If your button connects to GND the active level is --low.
$ python2 avr32_dfu_config.py --low 19
$ python3 avr32_dfu_config.py --low 19

4) Write the user page to the device
$ dfu-programmer at32uc3b0256 erase
Expand Down
2 changes: 1 addition & 1 deletion tools/bootloader/can/host/bootloader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

""" Bootloader for AVR-Boards connected via CAN bus
Expand Down
2 changes: 1 addition & 1 deletion tools/bootloader/can/host/can.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

import threading
import Queue
Expand Down
2 changes: 1 addition & 1 deletion tools/bootloader/can/host/message_dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

# -----------------------------------------------------------------------------
class MessageDispatcher:
Expand Down
2 changes: 1 addition & 1 deletion tools/bootloader/can/host/message_filter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

# -----------------------------------------------------------------------------
class BaseFilter:
Expand Down
2 changes: 1 addition & 1 deletion tools/device_file_generator/avr_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion tools/device_file_generator/dfg/avr/avr_registers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion tools/device_file_generator/stm_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion tools/device_files/device_element.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/device_files/device_identifier.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion tools/device_files/parser_exception.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

class ParserException(Exception):
Expand Down
2 changes: 1 addition & 1 deletion tools/device_files/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/logger/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
4 changes: 2 additions & 2 deletions tools/regression.README
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Usage
=====

$ cd xpcc/tools
$ python2 regression.py -u
$ python regression.py -u
... change compiler-options in avr.py or arm.py ...
$ python2 regression.py -v
$ python regression.py -v
2 changes: 1 addition & 1 deletion tools/regression.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/builder_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down
4 changes: 2 additions & 2 deletions tools/system_design/builder/cpp_communication.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down Expand Up @@ -44,7 +44,7 @@ class CppCommunicationBuilder(builder_base.Builder):
methods, which are corresponding to Actions of given Components.
A common call would be like:
$python2 java_communication.py --outpath source/rca/robot --package rca.robot robot.xml;
$python3 java_communication.py --outpath source/rca/robot --package rca.robot robot.xml;
"""


Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/cpp_identifier.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/cpp_packets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/cpp_postman.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/cpp_xpcc_task_caller.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/filter/cpp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/filter/java.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down
2 changes: 1 addition & 1 deletion tools/system_design/builder/generate_include_graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Roboterclub Aachen e.V.
# All rights reserved.
Expand Down
4 changes: 2 additions & 2 deletions tools/system_design/builder/java_communication.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down Expand Up @@ -40,7 +40,7 @@ class JavaCommunicationBuilder(builder_base.Builder):
methods, which are corresponding to Actions of given Components.
A common call would be like:
$python2 java_communication.py --outpath source/rca/robot --package rca.robot robot.xml;
$python3 java_communication.py --outpath source/rca/robot --package rca.robot robot.xml;
"""


Expand Down
4 changes: 2 additions & 2 deletions tools/system_design/builder/java_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, Roboterclub Aachen e.V.
Expand Down Expand Up @@ -38,7 +38,7 @@ class JavaGeneratorBuilder(builder_base.Builder):
a typesafe manner based on xml communication definitions.

A common call would be like:
$python2 java_generator.py --outpath source/rca/robot --package rca.robot robot.xml;
$python3 java_generator.py --outpath source/rca/robot --package rca.robot robot.xml;
"""

VERSION = "0.1"
Expand Down
Loading

0 comments on commit 94fe8bf

Please sign in to comment.