simon-git: spigot (master): spigot.git
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Nov 8 21:21:32 GMT 2016
TL;DR:
8b433e4 Script to set up a Python test environment.
8910d67 Add a 'minimum power' option to powbegin.py.
Repository: https://git.tartarus.org/simon/spigot.git
On the web: https://git.tartarus.org/?p=simon/spigot.git
Branch updated: master
Committer: spigot.git
Date: 2016-11-08 21:21:32
commit 8b433e4f12a779475e5a8643eefb30ee9ceb9a6f
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=8b433e4f12a779475e5a8643eefb30ee9ceb9a6f;hp=b49398f50a47c72487012c889cdcb6b14233f5e3
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Nov 8 18:42:54 2016 +0000
Script to set up a Python test environment.
I'm tired of pasting that PYTHONPATH environment setting out of the
cheatsheet comment in setup.py, so I've set up a script that should
work it out automatically (and, bonus, adapt to whatever host
architecture I'm doing it on).
python/setup.py | 21 ++++++++++++++++-----
python/testenv | 33 +++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 5 deletions(-)
commit 8910d67916655ff4334ac128fc958bb4f1ca864e
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=8910d67916655ff4334ac128fc958bb4f1ca864e;hp=8b433e4f12a779475e5a8643eefb30ee9ceb9a6f
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Nov 8 21:17:52 2016 +0000
Add a 'minimum power' option to powbegin.py.
Apparently this totally pointless program is just so much fun to
tinker with that I just can't stop once I get started :-) The new
option allows me to ask for the smallest power of a _at least m_ that
begins with the digits of b. So, for example, having found that the
smallest power of 7 beginning "49" is of course 7^2, I can then add
-m3 to the command line to ask 'OK, what's the _next_ one?' and be
told that it doesn't happen again until 7^73.
In particular, I've arranged for the _default_ minpower to be chosen
in such a way that the program will never put the digits you cared
about below the decimal point - e.g. asking for a power of 2 that
begins "10" now returns 2^10 = 1024, which is more likely to be what
you actually meant than returning 2^0 = 1.0 on a technicality. (And if
you really did want the latter behaviour, you can say -m0 explicitly.)
python/powbegin.py | 113 ++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 81 insertions(+), 32 deletions(-)
More information about the tartarus-commits
mailing list