Search

Weird behavior in python (tkinter)
I'm working on a little gui app that will eventually (hopefully) add a watermark to a photo. But right now I'm focused on just messing around with tkinter and trying to get some basic functionality down.
I've managed to display an image. Now I want to change the image to whatever is in the Entry widget (ideally, the user would put an absolute path to an image and nothing else). When I click the button, it makes the image disappear. I made it also create a plain text label to see if that would show up. It did.
Okay, time to break out the big guns. Add a breakpoint. py -m pdb main.py
. it works. wtf?
python
def change_image(): new_image = Image.open(image_path.get()).resize((480, 270)) new_tk_image = ImageTk.PhotoImage(new_image) test_image_label.configure(image=new_tk_image) breakpoint()
with the breakpoint, the button that calls change_image works as expected. But without the breakpoint, it just makes the original image disappear. Please help me understand w

Why can't I get eww to load this literal variable?
Edit: TL;DR, a literal can't contain multiple children. The opening bracket that starts the literal must be closed at the end of the literal, with no other yuck appended.
I've been playing with Elkowar's Wacky Widgets in an attempt to replace tint2 on openbox. Specifically, I've been working on a taskbar widget. So far, I've managed to make a few bash scripts to generate all the necessary yuck (and png files) to create a rudimentary icon-only taskbar that updates itself every time _NET_ACTIVE_WINDOW changes. I've confirmed that the yuck works when I manually copy/paste the output of the bash script into eww.yuck.
Anyway, I've assigned this script to a deflisten variable called "tasks". When I run "eww state" in a terminal, I confirm that "tasks" is indeed defined (and regularly updated) with yuck that looks like this.
::: spoiler spoiler
(box :tooltip Xfce4-terminal
(eventbox :onclick ~/.config/eww/scripts/taskbaractions.sh 0x120000a 0x120000a
(image :image-height 16 :path `/ho