Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Updating/running code when path changes
Post: RE: Updating/running code when path changes

(Jul-08-2022, 09:22 PM)deanhystad Wrote: Write a small program that opens a file and displays an image. Don't worry about the .after() or getting the filename from somewhere. Just open a file in...
hermannhaf GUI 14 3,197 Jul-09-2022, 04:17 PM
    Thread: Updating/running code when path changes
Post: RE: Updating/running code when path changes

(Jul-08-2022, 08:43 PM)deanhystad Wrote: The most likely error is it failed to open an image to display. I didn't test any of my code, and I could have introduced an error when I modified your sour...
hermannhaf GUI 14 3,197 Jul-08-2022, 09:13 PM
    Thread: Updating/running code when path changes
Post: RE: Updating/running code when path changes

Thank you deanhystad, but now all I get is black background and no image. Thank you for your help!
hermannhaf GUI 14 3,197 Jul-08-2022, 08:38 PM
    Thread: Updating/running code when path changes
Post: RE: Updating/running code when path changes

Here's the full code and error: import json import os import tkinter import PIL import PIL.Image import tkinter as tk from PIL import Image, ImageTk import numpy as np path = "near_side_1024x1024x8...
hermannhaf GUI 14 3,197 Jul-07-2022, 10:30 AM
    Thread: Updating/running code when path changes
Post: RE: Updating/running code when path changes

(Jul-06-2022, 01:12 PM)deanhystad Wrote: You need a periodic event. In tkinter you could use .after() to call a function. def update_phase(): with open('number.json', 'r') as f: distros...
hermannhaf GUI 14 3,197 Jul-06-2022, 01:54 PM
    Thread: Updating/running code when path changes
Post: Updating/running code when path changes

Hello I’m working on a project and I need help. I have a Raspberry Pi that is connected to a small display. I want the display to show the current moon phase, I’ve already downloaded all the images,...
hermannhaf GUI 14 3,197 Jul-06-2022, 12:49 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020