29 August, 2017

Philips Hue API

Experiments with the Philips Hue API. It's possible to control the lights in multiple ways. The json body is easy to understand. The color system is a challenge. How do you get a color picker for it? We'll see.

26 August, 2017

Koala GUI won't run on Ubuntu

Here is the recipe. And the solution is:

cd /lib/i386-linux-gnu/ or cd /usr/lib/
cd /lib/x86_64-linux-gnu/ or cd /usr/lib64/

sudo ln -s libudev.so.1 libudev.so.0

09 August, 2017

Appjar Evening Coding Session

During this evening's coding session I created a primitive GUI in Python with Appjar. I just wanted to try out Appjar. Using it is a charm compared to the GLADE GUI builder or Tkinter.

For the code: click here.

08 August, 2017


radioAppjar.py - stream running

appJar GUI (very primitive, but WTH)

Notes from my first fumbling with appjar. I'm looking for something that's more intuitive than Tkinter or Glade. Appjar is promising, at least for those of us with web programming experience. The code is somehow akin to JavaScript or even CSS.

The images above is my first GUI made in appJar. The files are available on Github.

Appjar is not standard Python, so the first task is:

Install appjar

# pip install appjar

The First File

# import the library
from appJar import gui
# create a GUI variable called app
app = gui()

# add & configure widgets - widgets get a name, to help referencing them later
app.addLabel("title", "My first Apphar")
app.setLabelBg("title", "green")

# start the GUI

Get a value from a widget

  • .getEntry(title)
    This will return the contents of the specified entry box.
    NB. numericEntries always return a float.
  • .getAllEntries()
    This will return the contents of all entries in the app, as a dictionary.
    NB. numericEntries always return a float.

01 August, 2017

Libre Office - stop writing I when I want i

Yep! It's so annoying that Libre Office "corrects" all my i-s to I-s when I write in Danish. Here's the cure: funktioner / inststillinger / sprog / standardsprog for dokumenter:

Remember to set the language to Dansk.