Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: It it possible to make a help file explorer with tkinter?
Post: It it possible to make a help file explorer with t...

I've created an interactive guide using tkinter and I'd like to add a helpfileesque navagation pane to it, as similar to this as possible: [Image: https://media.pcwin.com/images/screen/58...sy_chm.gif...
Clunk_Head GUI 0 234 Aug-07-2021, 06:02 PM
    Thread: Is rememberme.memory() accurate for recursive structures?
Post: RE: Is rememberme.memory() accurate for recursive ...

(Dec-17-2020, 10:39 AM)Gribouillis Wrote: You could perhaps add a __slots__ member to your classes, especially the nodes and see if it changes anything (I don't know rememberme.memory()). With slot...
Clunk_Head Data Science 2 669 Dec-17-2020, 06:07 PM
    Thread: Is rememberme.memory() accurate for recursive structures?
Post: Is rememberme.memory() accurate for recursive stru...

I'm trying to measure the size of my recursively defined data structures, but I'm getting wildly large results. Perhaps it's the tool that I'm using rememberme.memory(). I chose this because sys.getsi...
Clunk_Head Data Science 2 669 Dec-15-2020, 02:45 PM
    Thread: Error in code NameError: name ' ' is not defined
Post: RE: Error in code NameError: name ' ' is not defin...

As others have said, you created numb as an int and are then trying to define variables inside of it. There are at least two simple solutions: 1) Define a variable for each case. #Instead of numb.x ...
Clunk_Head Homework 11 1,642 Sep-16-2020, 10:41 PM
    Thread: Newbie: Application/programme to write code
Post: RE: Newbie: Application/programme to write code

I like IDLE available at python.org, but there are a million options. But the specs you posted should be able to handle both of the applications you mentioned. Perhaps find which version to download t...
Clunk_Head News and Discussions 3 1,364 Sep-15-2020, 11:46 PM
    Thread: pip3 install opencv-python fails on 'skbuild'
Post: RE: pip3 install opencv-python fails on 'skbuild'

try: pip3 install opencv-python
Clunk_Head General Coding Help 2 2,415 Sep-15-2020, 06:32 AM
    Thread: tic-tac-toe with a computer player
Post: tic-tac-toe with a computer player

Seeing the recent tic-tac-toe thread in general programming made me curious about writing tic-tac-toe with a computer player. Here is the result: import random board = [] lines = ((0, 1, 2), (3, 4, 5...
Clunk_Head Code sharing 1 1,357 Sep-02-2020, 08:30 PM
    Thread: Select the other of 2 items in a list
Post: RE: Select the other of 2 items in a list

(Sep-01-2020, 04:09 PM)buran Wrote: (Aug-31-2020, 08:30 PM)Clunk_Head Wrote: I need to be able to have one item of a list in a variable and use that yo put the other into a separate variable.I thi...
Clunk_Head General Coding Help 7 1,198 Sep-01-2020, 05:27 PM
    Thread: Select the other of 2 items in a list
Post: RE: Select the other of 2 items in a list

(Aug-31-2020, 08:51 PM)bowlofred Wrote: In your attempt above, if these are really lists then the opponent = pieces isn't useful because it's just referencing the pieces list, so any modification wi...
Clunk_Head General Coding Help 7 1,198 Sep-01-2020, 04:04 PM
    Thread: Select the other of 2 items in a list
Post: RE: Select the other of 2 items in a list

(Aug-31-2020, 07:48 PM)bowlofred Wrote: I would probably just shuffle the list, then use the first one as my piece and the second as the opponent. import random pieces = ["X", "O"] pieces = random....
Clunk_Head General Coding Help 7 1,198 Aug-31-2020, 08:30 PM
    Thread: Select the other of 2 items in a list
Post: Select the other of 2 items in a list

I have a bit of code that selects the other of two items in a list. It works fine but I'm wondering if there a more pythonic way of doing it import random pieces = ["X", "O"] piece = random.choice(pie...
Clunk_Head General Coding Help 7 1,198 Aug-31-2020, 06:23 PM
    Thread: Tic-Tac game (Beginner's coding)
Post: RE: Tic-Tac game (Beginner's coding)

I'm not an expert by any means, but here is my quick version of tic-tac-toe: board = [[" ", " ", " "], [" ", " ", " "], [" ", " ", " "]] lines = (((0,0), (0,1), (0,2)), ((1,0), (1,1), (1,2)), ((2,0), ...
Clunk_Head General Coding Help 5 1,229 Aug-29-2020, 04:39 PM
    Thread: Reading csv with multiple "headers"
Post: RE: Reading csv with multiple "headers"

Since the file is oddly formatted I suggest that you do not use csv. Instead just read the file line by line in your expected pattern. Copy each line into a new list and insert your new values in the...
Clunk_Head General Coding Help 3 896 Jun-04-2020, 02:30 PM
    Thread: Python Hangman Game - Multiple Letters Problem
Post: RE: Python Hangman Game - Multiple Letters Problem

The find function returns the index of the first instance found. That's why it stops working after the first one is found. If it doesn't find an instance then it returns -1. What you need to do is kee...
Clunk_Head General Coding Help 4 1,439 Jun-04-2020, 02:26 PM
    Thread: Class variables
Post: RE: Class variables

(Jun-04-2020, 12:53 PM)menator01 Wrote: Given the scenario class SomeClass: myvar = 0 def __init__(self): do stuff here def func(self): do stuff here myvar += 1 ...
Clunk_Head General Coding Help 2 701 Jun-04-2020, 02:12 PM
    Thread: Yet another pig latin thread
Post: Yet another pig latin thread

I've read many of the pig latin threads on this forum and many make the common mistake of only moving the first letter if is a consonant, others fail to account for a single letter word being left alo...
Clunk_Head Code Review 0 698 Jun-01-2020, 02:11 AM
    Thread: 'tuple' object has no attribute 'data'
Post: RE: 'tuple' object has no attribute 'data'

Please post the entire traceback using the insert error tag in the editor. There is more useful information in it besides what you have provided.
Clunk_Head General Coding Help 2 1,508 Feb-25-2020, 06:46 PM
    Thread: A better way to limit loop execution?
Post: RE: A better way to limit loop execution?

(Feb-25-2020, 06:31 PM)t4keheart Wrote: I wish there were something with persistent memory that I could write to for this purpose.. but there has to be a better way? There most certainly is, but wit...
Clunk_Head General Coding Help 3 1,148 Feb-25-2020, 06:40 PM
    Thread: Different Indentation Different Result
Post: RE: Different Indentation Different Result

(Feb-12-2020, 08:09 PM)el_bueno Wrote: (Feb-12-2020, 07:35 PM)ndc85430 Wrote: Do you understand how if and for work and that the indentation determine which statements are part of those blocks? I'...
Clunk_Head General Coding Help 10 1,304 Feb-12-2020, 08:30 PM
    Thread: Printing output without print usage
Post: RE: Printing output without print usage

Try using two lists. One list like you have with all of the questions, and a second list with all of the answers. You are tacking the answers onto the end of your list so the indices are not lined up.
Clunk_Head General Coding Help 1 686 Feb-07-2020, 07:52 PM

User Panel Messages

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