Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to edit Tkinter Minimize, Maximize, and Close Buttons
Post: RE: How to edit Tkinter Minimize, Maximize, and Cl...

From the link I provided, I don't think you can directly edit the titlebar as it's managed by the systems window manager. Probably best option is to use root.resizable(False, False) A way to detect ...
menator01 General Coding Help 7 136 11 hours ago
    Thread: How to edit Tkinter Minimize, Maximize, and Close Buttons
Post: RE: How to edit Tkinter Minimize, Maximize, and Cl...

This will remove the titlebar import tkinter as tk root = tk.Tk() root.overrideredirect(True) # This removes the title bar. root.mainloop()More can be found here https://blog.finxter.com/5-best-ways-...
menator01 General Coding Help 7 136 11 hours ago
    Thread: How To Make A PyQt5 Progress Bar Run While Executing A Function
Post: RE: How To Make A PyQt5 Progress Bar Run While Exe...

Maybe this link will help. Seems to be what you are trying to do. https://realpython.com/python-pyqt-qthread/
menator01 GUI 1 133 Today, 02:18 AM
    Thread: Good way to ignore case when searching elements?
Post: RE: Good way to ignore case when searching element...

You might could try something like this from bs4 import BeautifulSoup html_doc = """ <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" charset="UTF-8...
menator01 General Coding Help 1 143 Yesterday, 12:39 PM
    Thread: how to edited Tkinter Toplevel from main form?
Post: RE: how to edited Tkinter Toplevel from main form?

I'm not sure. I do it that way so root is not the parent window. It is its own parent.
menator01 General Coding Help 7 232 Apr-24-2024, 12:28 PM
    Thread: how to edited Tkinter Toplevel from main form?
Post: RE: how to edited Tkinter Toplevel from main form?

Are you trying to do something like this? from tkinter import Button, Label, Toplevel, Tk def edit(window): window.title('Edited Top Window Title') def openwindow(): window = Toplevel(None) ...
menator01 General Coding Help 7 232 Apr-24-2024, 12:07 PM
    Thread: Using Lists as Dictionary Values
Post: RE: Using Lists as Dictionary Values

Can you post the code you are using?
menator01 General Coding Help 8 338 Apr-19-2024, 08:57 PM
    Thread: How do I parse the string?
Post: RE: How do I parse the string?

Another way astring = 'FTP://21.105.28.15/abc/test1.txt' astring2 = 'FTP://21.105.28.15/abc/def/test1.txt' def remover(astring): astring = astring.split('/') for index, item in enumerate(astr...
menator01 General Coding Help 4 315 Apr-10-2024, 10:23 AM
    Thread: tkinter - Random Quote from internet
Post: tkinter - Random Quote from internet

Gets random quote from internet import requests import json import tkinter as tk root = tk.Tk() root.title('Random quote of the day') def get_quote(): frame = tk.Frame(root) frame.grid(co...
menator01 Code sharing 0 216 Apr-02-2024, 07:44 PM
    Thread: How to Randomly Print a Quote From a Text File When User Types a Command on Main Menu
Post: RE: How to Randomly Print a Quote From a Text File...

These are the same and either is fine to use. from random import choice import random alist = [1,2,3,4,5,6,7,8,9] atuple = ['a','b','c','d','e'] print(f'import random module as whole -> {random.c...
menator01 General Coding Help 13 890 Apr-02-2024, 12:33 AM
    Thread: How to Randomly Print a Quote From a Text File When User Types a Command on Main Menu
Post: RE: How to Randomly Print a Quote From a Text File...

The first part -- "from random import choice" -- is actually another import, so I should probably put it right below "import random", right? - This is just part of the random module you can import ran...
menator01 General Coding Help 13 890 Apr-01-2024, 11:29 PM
    Thread: How to Randomly Print a Quote From a Text File When User Types a Command on Main Menu
Post: RE: How to Randomly Print a Quote From a Text File...

A basic random quote example using a text file from random import choice with open('quote.txt', 'r') as quotes: quotes = quotes.readlines() def get_quote(): return choice(quotes) w...
menator01 General Coding Help 13 890 Apr-01-2024, 10:28 PM
    Thread: Printing out incidence values for Class Object
Post: RE: Printing out incidence values for Class Object

Here is one possible way. from random import choice, randint class Character: def __init__(self, clothing, gear): self.name = choice(('Charlie', 'Troy', 'Elaina', 'Brenda', 'Ralph')) ...
menator01 General Coding Help 3 303 Mar-31-2024, 08:44 PM
    Thread: I don't know what is wrong (Python and SQL connection)
Post: RE: I don't know what is wrong (Python and SQL con...

Hope you don't mind but, I spruced up your app a little. I didn't do any of the database functions as I don't really know what you are wanting them to do. On a side note you have a delete and reset bu...
menator01 General Coding Help 3 365 Mar-28-2024, 06:46 PM
    Thread: Variable not defined even though it is
Post: RE: Variable not defined even though it is

Looks like you running python from a cmd line in shell and not the script itself. either do python script.py or if in the interpreter do message = 'my message' then print(message)
menator01 General Coding Help 3 293 Mar-28-2024, 07:14 AM
    Thread: tkinter logo
Post: RE: tkinter logo

Thanks guys. This is what I went with. Added the Tcl/Tk text
menator01 Bar 3 302 Mar-27-2024, 03:05 PM
    Thread: tkinter logo
Post: tkinter logo

Does tkinter have a logo? I've searched and not found anything. Is it the word tkinter itself?
menator01 Bar 3 302 Mar-26-2024, 09:59 PM
    Thread: Tkinter & Canvas
Post: RE: Tkinter & Canvas

Are you trying to do something like this? import tkinter as tk from tkinter import ttk class Container(tk.Canvas): ''' Container creates an image on a canvas ''' def __init__(self, parent,...
menator01 General Coding Help 5 407 Mar-23-2024, 09:41 PM
    Thread: I'm getting a NameError: ...not defined.
Post: RE: I'm getting a NameError: ...not defined.

Please use bbtags when posting code. The error is saying that you need to define a value for name. Add name = '' above the if statement.
menator01 General Coding Help 2 303 Mar-23-2024, 09:37 PM
    Thread: How to include one script into another?
Post: RE: How to include one script into another?

You can use the import system Quick example one.py def func(): return 'One.py'two.py def func(): return 'Two.py'three.py def func(): return 'Three.py'main.py import one, two, three prin...
menator01 General Coding Help 8 491 Mar-21-2024, 12:57 AM

User Panel Messages

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