From 8ce714cd248c3215e18b8182d37a3cd3f0badbda Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 18 Feb 2017 09:43:34 -0500 Subject: [PATCH] Enable GNU realine keys, fix a small but fatal bug. --- NEWS | 3 +++ sst.py | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a551ced..19e4f52 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ SST2K project news. +2.2 @ + Enable GNU readline keys. + 2.1 @ 2012-02-16 Packaging fixes, pychecker cleanup, cope with Freshmeat name changes. diff --git a/sst.py b/sst.py index b34801a..8583af2 100755 --- a/sst.py +++ b/sst.py @@ -13,6 +13,13 @@ on how to modify (and how not to modify!) this code. """ import os, sys, math, curses, time, readline, pickle, random, copy, gettext, getpass +# This import only works on Unixes. The intention is to enable +# Ctrl-P, Ctrl-N, and friends in Cmd. +try: + import readline +except ImportError: + pass + version = "2.1" docpath = (".", "../doc", "/usr/share/doc/sst") @@ -5705,7 +5712,7 @@ def choose(): game.state.remres = (game.inkling+4*game.incom)*game.intime game.inresor = game.state.remres if game.inkling > 50: - game.state.inbase += 1 + game.inbase += 1 return False def dropin(iquad=None): -- 2.31.1