Description: use 'python3' instead of 'python' when calling scripts
 also in the documentation
Author: IOhannes m zmölnig
Origin: Debian
Forwarded: not-needed
Last-Update: 2019-09-10
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- python-can.orig/can/logger.py
+++ python-can/can/logger.py
@@ -29,7 +29,7 @@
 
 def main():
     parser = argparse.ArgumentParser(
-        "python -m can.logger",
+        "python3 -m can.logger",
         description="Log CAN traffic, printing messages to stdout or to a given file.")
 
     parser.add_argument("-f", "--file_name", dest="log_file",
--- python-can.orig/can/player.py
+++ python-can/can/player.py
@@ -19,7 +19,7 @@
 
 def main():
     parser = argparse.ArgumentParser(
-        "python -m can.player",
+        "python3 -m can.player",
         description="Replay CAN traffic.")
 
     parser.add_argument("-f", "--file_name", dest="log_file",
--- python-can.orig/can/viewer.py
+++ python-can/can/viewer.py
@@ -326,7 +326,7 @@
         kwargs = {'allow_abbrev': False}
 
     # Parse command line arguments
-    parser = argparse.ArgumentParser('python -m can.viewer',
+    parser = argparse.ArgumentParser('python3 -m can.viewer',
                                      description='A simple CAN viewer terminal application written in Python',
                                      epilog='R|Shortcuts: '
                                             '\n        +---------+-------------------------+'
@@ -370,7 +370,7 @@
                                '\n      q = int64_t, Q = uint64_t'
                                '\n      f = float (32-bits), d = double (64-bits)'
                                '\nFx to convert six bytes with ID 0x100 into uint8_t, uint16 and uint32_t:'
-                               '\n  $ python -m can.viewer -d "100:<BHL"'
+                               '\n  $ python3 -m can.viewer -d "100:<BHL"'
                                '\nNote that the IDs are always interpreted as hex values.'
                                '\nAn optional conversion from integers to real units can be given'
                                '\nas additional arguments. In order to convert from raw integer'
@@ -379,16 +379,16 @@
                                '\nto convert from real units to raw integer values.'
                                '\nFx lets say the uint8_t needs no conversion, but the uint16 and the uint32_t'
                                '\nneeds to be divided by 10 and 100 respectively:'
-                               '\n  $ python -m can.viewer -d "101:<BHL:1:10.0:100.0"'
+                               '\n  $ python3 -m can.viewer -d "101:<BHL:1:10.0:100.0"'
                                '\nBe aware that integer division is performed if the scaling value is an integer.'
                                '\nMultiple arguments are separated by spaces:'
-                               '\n  $ python -m can.viewer -d "100:<BHL" "101:<BHL:1:10.0:100.0"'
+                               '\n  $ python3 -m can.viewer -d "100:<BHL" "101:<BHL:1:10.0:100.0"'
                                '\nAlternatively a file containing the conversion strings separated by new lines'
                                '\ncan be given as input:'
                                 '\n  $ cat file.txt'
                                 '\n      100:<BHL'
                                 '\n      101:<BHL:1:10.0:100.0'
-                                '\n  $ python -m can.viewer -d file.txt',
+                                '\n  $ python3 -m can.viewer -d file.txt',
                           metavar='{<id>:<format>,<id>:<format>:<scaling1>:...:<scalingN>,file.txt}',
                           nargs=argparse.ONE_OR_MORE, default='')
 
@@ -396,7 +396,7 @@
                           '\n      <can_id>:<can_mask> (matches when <received_can_id> & mask == can_id & mask)'
                           '\n      <can_id>~<can_mask> (matches when <received_can_id> & mask != can_id & mask)'
                           '\nFx to show only frames with ID 0x100 to 0x103 and 0x200 to 0x20F:'
-                          '\n      python -m can.viewer -f 100:7FC 200:7F0'
+                          '\n      python3 -m can.viewer -f 100:7FC 200:7F0'
                           '\nNote that the ID and mask are alway interpreted as hex values',
                           metavar='{<can_id>:<can_mask>,<can_id>~<can_mask>}', nargs=argparse.ONE_OR_MORE, default='')
 
--- python-can.orig/test/test_scripts.py
+++ python-can/test/test_scripts.py
@@ -72,7 +72,7 @@
 
     def _commands(self):
         commands = [
-            "python -m can.logger --help",
+            "python3 -m can.logger --help",
         ]
         return commands
 
@@ -85,7 +85,7 @@
 
     def _commands(self):
         commands = [
-            "python -m can.player --help",
+            "python3 -m can.player --help",
         ]
         return commands
 
--- python-can.orig/doc/scripts.rst
+++ python-can/doc/scripts.rst
@@ -3,7 +3,7 @@
 
 The following modules are callable from python-can.
 
-They can be called for example by ``python -m can.logger`` or ``can_logger.py`` (if installed using pip).
+They can be called for example by ``python3 -m can.logger`` or ``can_logger.py`` (if installed using pip).
 
 can.logger
 ----------
@@ -11,13 +11,13 @@
 Command line help, called with ``--help``:
 
 
-.. command-output:: python -m can.logger -h
+.. command-output:: python3 -m can.logger -h
 
 
 can.player
 ----------
 
-.. command-output:: python -m can.player -h
+.. command-output:: python3 -m can.player -h
 
 
 can.viewer
@@ -37,5 +37,5 @@
 
 The full usage page can be seen below:
 
-.. command-output:: python -m can.viewer -h
+.. command-output:: python3 -m can.viewer -h
 
