summaryrefslogtreecommitdiff
path: root/pokemontools/vba/keyboard.py
diff options
context:
space:
mode:
authorEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 15:43:15 -0700
committerEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 15:43:15 -0700
commita64657988a50522885618998e7f14168c299a19b (patch)
tree9240aab0fba75befe75d6059d62bea8a3e0fbd4e /pokemontools/vba/keyboard.py
parent0e1798937a4bf723813574281d0dc12c471c9199 (diff)
Fix most Python 3 compat issues with futurize --stage1
Diffstat (limited to 'pokemontools/vba/keyboard.py')
-rw-r--r--pokemontools/vba/keyboard.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pokemontools/vba/keyboard.py b/pokemontools/vba/keyboard.py
index 4a07e57..a3d7611 100644
--- a/pokemontools/vba/keyboard.py
+++ b/pokemontools/vba/keyboard.py
@@ -3,6 +3,7 @@
This file constructs a networkx.DiGraph object called graph, which can be used
to find the shortest path of keypresses on the keyboard to type a word.
"""
+from __future__ import print_function
import os
import itertools
@@ -44,7 +45,7 @@ def convert_nodes_to_button_press(node1, node2):
"""
Determines the button necessary to switch from node1 to node2.
"""
- print "getting button press for state transition: " + node1 + " -> " + node2
+ print("getting button press for state transition: " + node1 + " -> " + node2)
return graph.get_edge_data(node1, node2)["key"]
def plan_typing(text, current="A"):
@@ -56,7 +57,7 @@ def plan_typing(text, current="A"):
if target == current:
buttons.append("a")
else:
- print "Finding the shortest path between " + current + " and " + target
+ print("Finding the shortest path between " + current + " and " + target)
more_buttons = shortest_path(current, target)
buttons.extend(more_buttons)
buttons.append("a")