Image 1 — Need help fixing my Dad's jacket
Image 2 — Need help fixing my Dad's jacket
Image 3 — Need help fixing my Dad's jacket
Image 4 — Need help fixing my Dad's jacket
Image 5 — Need help fixing my Dad's jacket
▲ 3 r/mending+1 crossposts

Need help fixing my Dad's jacket

Last week, my Dad passed away. While going through his belongings, I discovered one of his favorite jackets and decided to take it home to remember him by. He was a smoker and worked outside a lot so the jacket was very dirty when I got it. Two washes with detergent and lukewarm water followed by a soap-less lukewarm soak got it to the point it's at now. The outside is 100% cotton with a 100% polyester infill and lining. I don't know how to sew at all but would learn if it means I can fix this jacket. Would these holes be worth sewing and if so, how would you recommend I do so? The holes only go through the outside layer, exposing the infill.

u/C4tpurr — 14 days ago

Complete noob to multithreading, any tips?

I've recently been making a typing game, like the ones I used to have in school to teach kids how to spell. The difference is, in this game you type the binary that makes up the ASCII characters in the word. I've wanted to add a timer that ticks down as you type, but I'm not sure how to get it to run while simultaneously accepting input. After a few searches, I was told to look into multithreading. How can I get a function to continue running, while another part of the script is being executed? Are there any modules you can recommend or other solutions to look into? Thank you for any suggestions!

Edit: Thank you all for the advice! I'm going to try out some of the suggestions. I forgot to mention that I was using the curses library for the project. I discovered that Curses has a method called .nodelay() so I might try that out first.

reddit.com
u/C4tpurr — 5 months ago

Which of these solutions do you prefer?

I'm working on making my own UI library as a practice exercise and came up with these two ways to make a header. I feel like option B is better because creating a new class instance could take up more memory? I'm not really sure and would love advice.

# Option A 
class Header:
    def __init__(self, text):
        self.text = text
        length = 6
        for l in self.text:
            length += 1
        print(f"──┤ {self.text} ├", "─"*(32-length), sep="")

Header("Lorem Ipsum")

# Option B 
def header(text):
    length = 6
    for l in text:
        length += 1
    print(f"──┤ {text} ├", "─"*(32-length), sep="")

header("Lorem Ipsum")
reddit.com
u/C4tpurr — 5 months ago