0
Commit Graph

10 Commits

Author SHA1 Message Date
Nicolas F
01f30de176 remove vestigial python2 references 2019-07-24 09:20:49 +02:00
Nicolas F
e348a548b6 Initial Python 3 port
Many things work, some don't. Notably, genPOI doesn't work, and
there's some signedness comparison stuff going on in the C extension.

This also completely drops support for Python 2, as maintaining a C
extension for both Python 2 and 3 is a pain and not worth it for the
9 months that Python 2 is still going to be supported upstream.

The documentation needs to be adjusted as well.

All of the few tests we have pass, and rendering a map works, both
with a configuration file and without. We can also use optimizeimages.

Concerns #1528.
2019-03-17 17:57:07 +01:00
Nicolas F
715b3a2d43 progressbar: actually flush the fd on update
A young software tinkerer from Switzerland noticed an issue with
an application he was working on one day. The progress bar it
was rendering only updated very rarely. This perplexed the teenager,
but never bugged him enough to investigate further. Nobody else seemed
to notice this, so maybe it was his system?

Fast forward a few years. The young man is now a 24 year old fully
grown manchild. The progress bar was still updating only very rarely.
On this rainy afternoon, the tinkerer had nothing else to do than
finally get to the bottom of this perplexing behaviour.

Much investigating was done. Did the Observer have a logic bug? No,
if we check in the update function by appending a line to a file,
we can see that it works properly. Besides, the logic of this piece
of code surely hasn't been changed for years.

Did maxvalue get set to 100 instead of the number of tiles? No, it
correctly overrode the right method to not just set max_value but
also maxvalue. (Great naming there, aheadley.)

Was it the polymorphic inheritance causing issues then? No, even the
parent class correctly behaved in its update function. Well, almost.
That is when the developer came upon a shocking revelation. His hands
trempled as his fingers moved across the laptop's keyboard, nearly
accidentally entering the "nuclear missile launch" mode in Kate's
Vi-Input editing. The developer added one line to the file.

self.fd.flush()

The progress bar finally worked as intended.
2019-03-01 14:36:28 +01:00
Andrew Chin
faa8d8f75c Replace python with python2
A continuation of c7d86eca76
2016-12-24 14:43:52 -05:00
aheadley
361d45b5e6 refactor eta widget 2012-03-28 16:55:28 -04:00
aheadley
abfb1d6053 fix crash on terminal resize 2012-03-27 10:31:00 -04:00
aheadley
a7d6ee81bb make progress bar more like wgets 2012-03-18 19:46:54 -04:00
aheadley
f3d23fb8f8 clean up observer code 2012-03-17 14:34:57 -04:00
aheadley
09caf006a3 add faction widget for progressbar 2012-03-16 12:46:32 -04:00
Alex Headley
6c6534fc3e add progressbar module 2012-03-16 12:32:46 -04:00