Relearning Python

A few weeks ago I posted about the trials of choosing a language and GUI toolkit. The requirements I had meant that I was leaning towards Java — particularly because of Apache FOP — and had ruled out scripting languages due to the need to ship the source code and an interpreter.

Since then, I’ve been playing with Pyinstaller, which appears to allow me to produce a single binary file which includes the Python bytecode and any libraries, plus the Python interpreter. This seems to tick all the boxes for me, which for reference are:

  • Closed source output
  • Cross-platform support
  • XML libraries
  • PDF output (using WeasyPrint)
  • Local data storage
  • Minimal dependencies

So I’ve been playing around with Python again, and in particular the Tkinter module which allows me to access the Tk widget toolkit. The two main things which are still a bit frustrating are the imperfect backwards-compatibility between 2.x and 3.x — though a lot of code works under both — and the fact that most of the books covering Tkinter are out of date.

If you are in the same boat as me — i.e. an experienced programmer in other languages but fairly new to Python — then I have found Learning Python to be a good introduction and Programming Python helpful for more advanced topics such as GUIs.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.