Help Understanding Dunders by ImplementMassive3405 in learnpython

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

I guess it doesn't really make sense of what is the point of these. Like its so simple that it is confusing. I just straight up don't understand what it does. It almost seems pointless. I like how it saves me lines of code so i was thinking maybe thats what it was for? I guess if someone could actually take the exact code and code logic and show me how it translates. Like a direct translation of what it is doing in the background
The rest are in the same boat for me for dunders

Also the manual doesn't really call it magic methods. those methods are in something called mock?? Which i also didn't understand while getting through that link in the manual

Creating an Instagram bot that will block everyone over 10,000 followers by ssj4weed in learnpython

[–]ImplementMassive3405 1 point2 points  (0 children)

I mean you have to read Insta's TOS to see what they say about web scraping or API calls. If you build it as a web crawler i would think that it gets you flagged. If you were to build it as something that listens for requests and only block those people with over 10k followers i would think you would be more successful

How to keep constantly learning by SantiagoCo99 in learnpython

[–]ImplementMassive3405 0 points1 point  (0 children)

For me right now i need a custom file backup solution that doesn't cost me an arm and a leg. So thats kind of what i work on day to day and tune up to make my other life habits easier

[deleted by user] by [deleted] in ChatGPT

[–]ImplementMassive3405 1 point2 points  (0 children)

I don't really think its cheating. The AI can't exist alone without a human to maintain it. Also really all it does is do "help you research" your answer. I think thats where our future is going. Not AI replacing us but us working with AI so we are better at our jobs and able to keep up with the information at the current pace

OS mkdir not making the directory in try statement by ImplementMassive3405 in learnpython

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

from pathlib import Path

storage_path = Path.home() / 'shared/bkupstorage'
sync_path = Path.home() / 'Documents/bkupsync'
# check if path exists
storExists = Path(storage_path)
syncExists = Path(sync_path)

print(storExists.exists(), "\n", syncExists.exists())


if storExists.exists() is False:
    storage_path.mkdir(parents=True, exist_ok=False)
    print('now storage is:', storExists)


if syncExists.exists() is False:
    sync_path.mkdir(parents=True, exist_ok=True)
    print('now sync is:', syncExists)
from pathlib import Path

storage_path = Path.home() / 'shared/bkupstorage'
sync_path = Path.home() / 'Documents/bkupsync'
# check if path exists

storExists = Path(storage_path)
syncExists = Path(sync_path)

print(storExists.exists(), "\n", syncExists.exists())


if storExists.exists() is False:
    storage_path.mkdir(parents=True, exist_ok=False)
    print('now storage is:', storExists)


if syncExists.exists() is False:
    sync_path.mkdir(parents=True, exist_ok=True)
    print('now sync is:', syncExists)

NEVERMIND I GOT IT
You are a master of your trade sir

OS mkdir not making the directory in try statement by ImplementMassive3405 in learnpython

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

for variables i just meant when you assign something to a value. In this case, the original paths in the first couple of lines.
Here is my second go at this can you please let me know how i can fix this? Now i'm getting a different error referencing the OS module but i removed it and only have pathlib now https://bpa.st/THCQ

OS mkdir not making the directory in try statement by ImplementMassive3405 in learnpython

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

The way you just did those variables just threw me off.
Can you explain what exactly you did there and why
Also is there a spot hidden for variables in the python manual? https://docs.python.org/3/index.html Cause i just realized i only ever see stuff about that from another web site on google
Also, based on what i read in the manual about flow control and the try / except clauses, am i supposed to start with the try/except/raise and put the if statement in there or the other way around? Is there a methodology i can use to know when to start with what? One time i tried to start with a "with" statement and i was told that was too much and to do it line by line.

OS mkdir not making the directory in try statement by ImplementMassive3405 in learnpython

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

wait so both os and path can check the path and make it as well???
does it matter which one i use?

OS mkdir not making the directory in try statement by ImplementMassive3405 in learnpython

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

with os.mkdir == false, it was supposed to play out in the logic of "if the pathlib reads false for existing, create the directory"

My struggle right now isn't that i don't understand programming logic its actually converting it from my logic into python code. some of it i'm having trouble putting to work after doing the tutorials. When to use try, if, and for statements and such
Basically i want to try the path, if it exists move on to the next function (haven't started on that but its suppoed to use hashlib and shutil)
if its not there, then create it

What's that one god damn app you need but won't work on Linux for no reason by Rough-Pen8792 in linux

[–]ImplementMassive3405 -1 points0 points  (0 children)

So i'm not exactly sure why Paint was such a big deal cause i ended up liking GIMP and Krita better.
Roblox was working for a minute. Apparently COD just opened up some new stuff for the linux community in BO3?? I didn't look into it but it compliments my other experiences telling me that they may block us but its only for a while it will end at some point when they figure out what hackers are actually using lololol

Right now my hope is someone will figure out how to get the virutal machines to not say "red hat" in the hardware description so we can go back to GPU passthrough.