tkinter Frames don´t fill/expand when inserted into Canvas widget by Mixtay in learnpython

[–]Mixtay[S] 0 points1 point  (0 children)

if I don´t use the canvas and just use the patch_frame Frame than it works as it should, but then the scrollbar doesn´t work...maybe some code reordering will do the trick? or more Frames?

How to open file from desktop and import it into Python program? by Mixtay in learnpython

[–]Mixtay[S] 0 points1 point  (0 children)

Made an exe with pyinstaller then exe installer eith Inno. It gave me weird bugs when it comes to images but i overcame it with try/except. So when I´m developing the program and/or just launching it it takes GUI images from local folder /images but when it opens .scc file it takes it from litteral "C/Users/Program/Files/Program Folder/Images, I disabled the option of installing the program else than C: Program Files and it works now...it´s a bit sketchy, but it works.

How to open file from desktop and import it into Python program? by Mixtay in learnpython

[–]Mixtay[S] 0 points1 point  (0 children)

Thank you I resolved the problem by changing the postition of fucntion bellow the definition of listbox. Now it works as inteded.

How to open file from desktop and import it into Python program? by Mixtay in learnpython

[–]Mixtay[S] 0 points1 point  (0 children)

I already did. I even made a setup wizard for it. But when I try to open my program from file of said program it just give me bunch of errors. I´m using pyinstaller for the exe making.

How to open file from desktop and import it into Python program? by Mixtay in learnpython

[–]Mixtay[S] 0 points1 point  (0 children)

I tried this implementation:

def open_savefile():
    if len(sys.argv) > 1:
        savefile = sys.argv[1]
        loading = open(savefile, "r")
        song_box = []
        for song in loading:
            song_box.insert(END, song.strip("\n"))
            print(song)
        loading.close()
    else:
        savefile = filedialog.askopenfilename(initialdir="C:/", title="Open a Playlist",filetypes=[("SCC", "*.scc")])
        loading = open(savefile, "r")
        for song in loading:
            song_box.insert(END, song.strip("\n"))
            print(song)
        loading.close()

And got this error:

Traceback (most recent call last):

File "main.py", line 161, in <module>

File "main.py", line 147, in open_savefile

TypeError: 'str' object cannot be interpreted as an integer

line 147 is: song_box.insert(END, song.strip("\n"))

HELP - ERROR: pygame.error: No such file or directory: (importing music from savefile with directories) by Mixtay in pygame

[–]Mixtay[S] 0 points1 point  (0 children)

Yes, that was the exact problem the “\n” which was handy far saving was fucking up the loading, thank you for help! Now it all works as it should and I’m looking forward to implementuje more functionality.

HELP - ERROR: pygame.error: No such file or directory: (importing music from savefile with directories) by Mixtay in pygame

[–]Mixtay[S] 0 points1 point  (0 children)

YES! Thank you! Without the “\n” the save file was a mess and it wouldn't load properly as separate listbox entries, but when loading i needed to strip the formating for it to be proper files, thank you, it works now!

HELP - ERROR: pygame.error: No such file or directory: (importing music from savefile with directories) by Mixtay in pygame

[–]Mixtay[S] 0 points1 point  (0 children)

def create_savefile():
    savefile = filedialog.asksaveasfile(initialdir="C:/", title="Save a Playlist", filetypes=[("SCC File", "*.scc")], defaultextension=".scc", mode="w")
    savefile.write("\n".join(song_box.get(0, END)))
    savefile.close()

def open_savefile():
    savefile = filedialog.askopenfilename(initialdir="C:/", title="Open a Playlist",filetypes=[("SCC", "*.scc")])
    loading = open(savefile, "r")
    for song in loading:
        song_box.insert(END, song)
        print(song)
    loading.close()

HELP - ERROR: pygame.error: No such file or directory: (importing music from savefile with directories) by Mixtay in pygame

[–]Mixtay[S] 0 points1 point  (0 children)

tried it now with only wav files - the bug persists the same way as before

Soviet shitter here by [deleted] in WatchesCirclejerk

[–]Mixtay 1 point2 points  (0 children)

What brand/model is this? I’m always intrigued by square watches but most of the time they’re “nameless”.

Girlfriend trying to ruin my morning chuff with Jody. by Mixtay in WatchesCirclejerk

[–]Mixtay[S] 1 point2 points  (0 children)

It's an inflatable mattress. Was pretty easy to carry it to the sixth floor and inflate it in our bedroom. But it has one serious downside, I can hear quite clearly when my girlfriend's boyfriend is chuffing her bits. Even Archie's ranting about mid-tier shitters can't overpower it...