screen

Python Tkinter Images Tearing On Scroll

Python Tkinter Images Tearing On Scroll Question: I’m working on a project to create a GUI application to display images as clickable buttons in Tkinter. I have the functionality completed where the images appear in a scroll-able grid on the GUI. However, when scrolling up or down there is terrible screen tearing with the images. …

Total answers: 3

binding movement and rotation of kivy scatter widgets

binding movement and rotation of kivy scatter widgets Question: Below I have a code that displays 2 scatter widgets in a kivy screen. If one widget is dragged, the other also drags and vice versa. What I want is in addition to movement, if one is rotated, the other rotates in the same way. In …

Total answers: 1

clean screen from previous output in a loop in python

clean screen from previous output in a loop in python Question: I have a for loop that iterate through the rows of dataframe containing some texts and shows the user texts associated with specific indices. The users should provide some labels to the text in each iteration of the loop. As some of the texts …

Total answers: 1

ImportError: libcuda.so.1: cannot open shared object file

ImportError: libcuda.so.1: cannot open shared object file Question: When I run my code with TensorFlow directly, everything is normal. However, when I run it in a screen window, I get the following error. ImportError: libcuda.so.1: cannot open shared object file: No such file or directory I have tried the command: source /etc/profile But it doesn’t …

Total answers: 4

How can I integrate Tkinter with Python log in screen?

How can I integrate Tkinter with Python log in screen? Question: I am using Tkinter to create a login screen here. At the moment, the “keep me logged in” button at the bottom is redundant and will remain so. What I want to do is use this code: from tkinter import * root = Tk() …

Total answers: 3

How to display text on the screen without a window using Python

How to display text on the screen without a window using Python Question: The Problem: I need to write text directly to the screen without a window. The text needs to appear above all other windows and full-screen applications and should not be clickable or interactable in any way. Example: The text doesn’t need to …

Total answers: 2

Clear screen in shell

Clear screen in shell Question: Just a quick question: How do you clear the screen in shell? I’ve seen ways like: import os os.system(‘cls’) This just opens the windows cmd, clears the screen and closes but I want the shell window to be cleared (PS: I don’t know this helps, but I’m using version 3.3.2 …

Total answers: 20

Python using basicConfig method to log to console and file

Python using basicConfig method to log to console and file Question: I don’t know why this code prints to the screen, but not to the file? File "example1.log" is created, but nothing is written there. #!/usr/bin/env python3 import logging logging.basicConfig(level=logging.DEBUG, format=’%(asctime)s %(message)s’, handlers=[logging.FileHandler("example1.log"), logging.StreamHandler()]) logging.debug(‘This message should go to the log file and to the …

Total answers: 7

Quickly getting the color of some pixels on the screen in Python on Windows 7

Quickly getting the color of some pixels on the screen in Python on Windows 7 Question: I need to get the color of some pixels on the screen or from the active window, and I need to do so quickly. I’ve tried using win32gui and ctypes/windll, but they’re much too slow. Each of these programs …

Total answers: 5

How do I get monitor resolution in Python?

How do I get monitor resolution in Python? Question: What is the simplest way to get monitor resolution (preferably in a tuple)? Asked By: rectangletangle || Source Answers: On Windows: from win32api import GetSystemMetrics print(“Width =”, GetSystemMetrics(0)) print(“Height =”, GetSystemMetrics(1)) If you are working with high resolution screen, make sure your python interpreter is HIGHDPIAWARE. …

Total answers: 32