#python-discussion

1 messages · Page 223 of 1

swift sparrow
#

Path('.') will be your "current working directory". Usually the location of where you're running your python file from

inland karma
hollow citrus
#

omg now i know how it works from pathlib import Path

current_folder = Path('.')

for file_or_dir in current_folder.iterdir():
print(file_or_dir)

i thought that i need to put in current_folder('') like then ame of the folder not just a plain dot i thoguht the dot was a place holder

swift sparrow
#

you can put the name of a folder if you want

hollow citrus
#

i tried it gave me errors

inland karma
#

. is always the current folder

swift sparrow
#

you likely needed to use a raw string

#

really common issue with windows path strings

inland karma
hollow citrus
#

whats a raw string pithink

swift sparrow
#

are you familair with special characters like \n?

hollow citrus
#

yes

inland karma
#

r'C:\Users\eivl\Documents\projects\new_project'

swift sparrow
#

well what if you had a path that had that in it? folder\new_stuff\november\data.txt

hollow citrus
#

C:\Users\liebe\OneDrive\programming.idea
C:\Users\liebe\OneDrive\programming\apis
C:\Users\liebe\OneDrive\programming\bank_system
C:\Users\liebe\OneDrive\programming\bitcoin
C:\Users\liebe\OneDrive\programming\calc
C:\Users\liebe\OneDrive\programming\compre
C:\Users\liebe\OneDrive\programming\learning
C:\Users\liebe\OneDrive\programming\ls_project
C:\Users\liebe\OneDrive\programming\password_checker_manager
C:\Users\liebe\OneDrive\programming\pdf
C:\Users\liebe\OneDrive\programming\PyCharmMiscProject
C:\Users\liebe\OneDrive\programming\TicTacToe

listed this

swift sparrow
#

python will get confused with the \n here in the path. There's many other special characters too. If we want python to treat everything here as literal text, we need the raw string. It basically tells python to ignore all the special sequences

hollow citrus
swift sparrow
hollow citrus
#

oh lol

swift sparrow
#

I said that things like \n can cause issues

hollow citrus
#

just an example

#

its odd why did r'' fix the problem i only ever use that for regex

swift sparrow
#

!e

print('1hello\nworld')
print(r'2hello\nworld')
edgy krakenBOT
swift sparrow
#

look at the difference between these two prints

#

One of them sees \n as a newline. One of them sees it as the literal text \n

hollow citrus
#

oh wow thanks for teaching me smth new didnt realize that

#

thats prob gonna be useful for the future t

swift sparrow
#

yes, it's really helpful for paths/regex

hollow citrus
#

C:\Users\liebe\OneDrive\programming.idea
C:\Users\liebe\OneDrive\programming\apis
C:\Users\liebe\OneDrive\programming\bank_system
C:\Users\liebe\OneDrive\programming\bitcoin
C:\Users\liebe\OneDrive\programming\calc
C:\Users\liebe\OneDrive\programming\compre
C:\Users\liebe\OneDrive\programming\learning
C:\Users\liebe\OneDrive\programming\ls_project
C:\Users\liebe\OneDrive\programming\password_checker_manager
C:\Users\liebe\OneDrive\programming\pdf
C:\Users\liebe\OneDrive\programming\PyCharmMiscProject
C:\Users\liebe\OneDrive\programming\TicTacToe instead of this getting printed any way for my to just print the project ideas

hollow citrus
swift sparrow
hollow citrus
#

i meant names

#

idk why i typed ideas 😭

swift sparrow
swift sparrow
hollow citrus
#

i didnt wonder enough for it

inland karma
hollow citrus
#

print(file_or_dir.name)

#

i did it before

swift sparrow
#

path objects have properties that allow you to access specific information

hollow citrus
#

i assumed it would be .name and i was right

swift sparrow
#

yeah, file_or_dir.name

hollow citrus
#

😎

swift sparrow
#

for files, this gives the full filename like foo.txt

hollow citrus
#

beat u to it eivl xd

swift sparrow
#

if you just want foo, it would be .stem

#

and if you just wanted the extension, it's .suffix

#

TIL about the with_stem method. Super useful

hollow citrus
#

stem and name give me same result

swift sparrow
#

it will for folders

inland karma
swift sparrow
#

not for files though

hollow citrus
#

suffix gives me nothing

swift sparrow
swift sparrow
hollow citrus
#

.stem =

.idea
apis
bank_system
bitcoin
calc
compre
learning
ls_project
password_checker_manager
pdf
PyCharmMiscProject
TicTacToe

.name =.idea
apis
bank_system
bitcoin
calc
compre
learning
ls_project
password_checker_manager
pdf
PyCharmMiscProject
TicTacToe

inland karma
#

with_suffix is the new one i think

hollow citrus
#

there isnt a diff here right?

inland karma
#

or maybe it was segments

swift sparrow
#

it only starts to make a difference when looking at files

lusty reef
#

When it comes to any sort of audio/voice input. Webrtcvad is basically a requirement right?

hollow citrus
#

like inside?

#

tosee whats inside of my files now like main.py and venv

swift sparrow
hollow citrus
#

what do u mean when looking into the names?

swift sparrow
lusty reef
#

My dumb ass has been using chatgpt to help guide me through what to use to build a voice assistant, and at first it was telling me this "np.linalg" which I guess is just for sound detection, not real voice detection

lusty reef
swift sparrow
#

if you print .name for a file, you get the full name, including extension

#

I'm saying if you want a specific part of the filename, like the part before the extension or just the extension, you need .stem or .suffix

inland karma
#

file_or_dir.stat() will also be usefull

lusty reef
#

faster Whisper keeps giving me phantom transcriptions using just np.linalg

white knot
hollow citrus
#

Oh like this

.stem

Attachments
Desktop
desktop
Documents
Pictures
programming

.name

Attachments
Desktop
desktop.ini
Documents
Pictures
programming the.inl goes poof

swift sparrow
hollow citrus
inland karma
#

yeah, i use it as well

swift sparrow
#

Lets me compare creation/modified time

inland karma
swift sparrow
inland karma
#

ahh.. good.. i missed that

hollow citrus
#

just want to go to the next step and making sure im on right track current_folder = Path(r'C:\Users\liebe\OneDrive\programming')

for file_or_dir in current_folder.iterdir():
file = file_or_dir
print(file)
from here i should like append my file to a list then go through the list and open each file to see whats inside of it?

swift sparrow
inland karma
#

ls does not look inside the file content

swift sparrow
#

ls lists the contents of a directory

inland karma
#

it just shows you file and folder stats on that line

hollow citrus
white knot
hollow citrus
#

but because i have smth like C:\Users\liebe\OneDrive\programming\TicTacToe cant i just list hwats inside the tictactoe

hollow citrus
swift sparrow
#

sure, how would adding it to a list first be any different?

swift sparrow
#

this is where you would have to implement cd

#

"change directory"

hollow citrus
#

thought it wouldnt work xd so i was gonna add it to a list this is much better

#

for file_or_dir in current_folder.iterdir():
if file_or_dir.is_dir():
for file in file_or_dir.iterdir():
print(file) got it

swift sparrow
#

at this point, you might as well just use rglob

white knot
#

How about recursion... I never used recursive stuff

swift sparrow
#

that's exactly what rglob is. The "r" stands for "recursive"

hollow citrus
#

why should i use recursion

neat pawn
#

I am very pythonic, never doubt me

swift sparrow
#

traversing file trees is a great use-case for recursion

#

you have function that says "look inside the folder". The recursive bit is "if you find a folder inside that folder, look inside that too"

white knot
#

Dir1 is parent of dir2

hollow citrus
#

is rglobe a function with module?

swift sparrow
hollow citrus
#

ok im gonna look for it and il try to do this part bymyself

#

so i wanna get rid
for file in file_or_dir.iterdir():
print(file) and use rglobe?

swift sparrow
#

I had already showed an example of it above

#

instead of *.png you can just do * to search for everything

hollow citrus
#

holy that prints alot

swift sparrow
#

it's every file and every folder

hollow citrus
#

all i want is the stuff inside the file not the stuff in file in file in file

#

for file in file_or_dir.iterdir():
print(file) this gave me it

#

gave me all the files that are in that file and done

swift sparrow
#

if you want to choose the next file to look in, you need to implement a cd function

hollow citrus
#

for file_or_dir in current_folder.iterdir():
if file_or_dir.is_dir():
for file in file_or_dir.iterdir():
print(file.name)
this worked

swift sparrow
#

that's how navigating directories in a terminal usually works

#

ls to list the contents of your current folder. cd to choose which folder to move into

hollow citrus
#

the recursion gave me everything i just needed the names inside the file not name in name in name

swift sparrow
#

so if I do ls and get back

dir_a
dir_b
dir_c
white knot
swift sparrow
#

if I want to know what's inside dir_b, I would do cd dir_b

slender urchin
#

Do you only need a certain file type?

swift sparrow
hollow citrus
#

i got to my folder with my project i open each project to see whats inside

#

for file_or_dir in current_folder.iterdir():
if file_or_dir.is_dir():
for file in file_or_dir.iterdir():
print(file)

this does exactly that

swift sparrow
#

that does the same as rglob

hollow citrus
#

recursions continues but at that point i dont need that info

hollow citrus
#

C:\Users\liebe\OneDrive\programming\TicTacToe.idea
C:\Users\liebe\OneDrive\programming\TicTacToe.venv
C:\Users\liebe\OneDrive\programming\TicTacToe\games.py i like this but recursion goes further

swift sparrow
hollow citrus
#

my folder is programming my folders(projects) in programming are what i want to go inside to see what folders are in them (main.py etc) i dont want to continue after that

#

recursion continues till the end

swift sparrow
#

but which one do you want to go inside specifically?

hollow citrus
#

but i dont care whats inside my main.py

swift sparrow
hollow citrus
swift sparrow
hollow citrus
#

C:\Users\liebe\OneDrive\programming\TicTacToe.idea
C:\Users\liebe\OneDrive\programming\TicTacToe.venv
C:\Users\liebe\OneDrive\programming\TicTacToe\games.py my code gives me this recurions continues

C:\Users\liebe\OneDrive\programming\TicTacToe\games.py/etc/etc/etc/etc till it cant no more

hollow citrus
swift sparrow
#

how do you want to decide which subfolder to look in?

hollow citrus
#

il figure that out soon but rglobe prints to much

slender urchin
#

Something like this? [Path(p) for p in glob.glob("**/*") if Path(p).is_file()]?

swift sparrow
#

did you read what I said about cd above?

hollow citrus
#

cd decides which folder to open yes ik

white knot
#

Both wildcard?

slender urchin
inland karma
#

glob syntax

swift sparrow
hollow citrus
#

C:\Users\liebe\OneDrive\programming\TicTacToe.venv\Lib\site-packages\charset_normalizer-3.4.4.dist-info\licenses\LICENSE
C:\Users\liebe\OneDrive\programming\TicTacToe.venv\Lib\site-packages\charset_normalizer\cli_init_.py
C:\Users\liebe\OneDrive\programming\TicTacToe.venv\Lib\site-packages\charset_normalizer\cli_main_.py
C:\Users\liebe\OneDrive\programming\TicTacToe.venv\Lib\site-packages\charset_normalizer\cli_pycache_ just expkaining what i mean about inf o idont want idc about whats in my .venv i just wanted to see if i have a .venv .main etc in my folder idc about the other stuff

hollow citrus
white knot
#

Hmm but what are you trying to achieve just learning??

swift sparrow
#

then you can easily navigate your folders with code

#

it's quite simple to set up

hollow citrus
#

input = input("Enter a file name: ")
current_folder = Path(fr'C:\Users\liebe\OneDrive\programming{input}')

for file_or_dir in current_folder.iterdir():
print(file_or_dir)
im dumb i dont need an extra loop

#

😂

swift sparrow
#

(also don't use input as a variable)

hollow citrus
#

ye ik i was gonna change it

#

just wanted to see if it worksbut hey now i made it work time to clean it up

swift sparrow
#

also make sure you're clear about the difference between a file and folder

hollow citrus
#

Enter a file name: ls_project
.idea
.venv
main.py

swift sparrow
#

I think a lot of your questions were confusing because you were mixing them up

hollow citrus
#

i know im sorry for confusing u xd

swift sparrow
#
location = input("Enter a folder name: ")
current_folder = Path('.') / location


for contents in current_folder.iterdir():
    print(contents)
#

/ is the best 🙂

hollow citrus
#

it was confusing me that there is folders in folders so i kept confusing u xd

digital canyon
#

Tell me how to have txt file in structured format? When we have data in tabular form

#

Means what to do to have structured txt file

swift sparrow
hollow citrus
#

location = input("Enter a folder name: ")
current_folder = Path(r'C:\Users\liebe\OneDrive\programming') / location

for file_or_dir in current_folder.iterdir():
print(file_or_dir.name) this code is only 5 lines its not even long or smth

digital canyon
#

Actually I have convert PDFs to txt files

hollow citrus
#

now i gotta add when it was created and all but im getting the hang of it now so w?

swift sparrow
digital canyon
#

I already use json still

proud escarp
#

does everybody use ruff as their linter now? like i mean almost everybody
like how people have moved to using uv
is ruff "the" linter for python during this time

hollow citrus
#

i did cd ls_project then ls

proud escarp
#

someone told me that it is but ive never thought of it that way

swift sparrow
proud escarp
#

ive only thought of it as another linter available, which is popular right now

hollow citrus
swift sparrow
#

so you need to parse if they typed cd and what the following dir name is

hollow citrus
#

what should i print if they only want to do cd

white knot
swift sparrow
#

you just need to keep track of the "current folder"

proud escarp
swift sparrow
#

cd just moves to a new "current folder"

hollow citrus
white knot
hollow citrus
#

ye i could do that

swift sparrow
#

and cd .. means "go up 1 folder"

white knot
#

I think ruff does that too?

proud escarp
#

ruff does yeah, it also sorts the imports like isort does

digital canyon
#

Actually I made chatbot and store that txt files in backend

hollow citrus
#

i think imma first do smth like this tho
Mode LastWriteTime Length Name


d----- 1/28/2026 10:41 AM .idea
d----- 1/28/2026 10:11 AM .venv
-a---- 1/28/2026 11:28 AM 267 main.py

swift sparrow
#

you can get the parent folder using .parent in pathlib

swift sparrow
hollow citrus
#

.parent folder would be programming right?

location = input("Enter a folder name: ")
current_folder = Path(r'C:\Users\liebe\OneDrive\programming') / location

hollow citrus
swift sparrow
#

!cleanban 1465834643302514760 ad spam

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @charred bison permanently.

pallid garden
#

darn, i was hoping i could give him some money because he promised me more money in return

swift sparrow
pallid garden
#

damn... job offers are insane nowadays

swift sparrow
#

he was banned so no one else could claim it

spice hill
#

baba is scam

swift sparrow
#

scam is win

spice hill
#

I don't think ruff is planning to add plugin support any time soon

golden mortar
hollow citrus
#

C:\Users\liebe\OneDrive\programming\ls_project\main.py' fosh how do i prevent the double \ else:
current_folder = current_folder / input_cd_ls

slender urchin
#

LIke using /d for [0-9]

pallid garden
#

is /d bad usage?

swift sparrow
white knot
#

0|1|2|3|4|5|6|7|8|9 is bad

swift sparrow
hollow citrus
swift sparrow
#

cd is "change directory"

pallid garden
#

why isnt it chdir

swift sparrow
#

depends on os 🤷

#

windows doesn't have ls

#

it's dir

#

nm powershell has ls, just not terminal

spice hill
# golden mortar What are suspicious/bad usages of re?

For example:

  • using modifiers that you might be used to using but are probably wrong (e.g. \d and $)
  • likely typos such as {3, 5} (which is the string {3, 5} literally, you probably meant {3,5}), or typoing (?<!negative lookahead) as (?!<negative lookahead)
  • using ^...$ or equivalent with re.match/re.search when you should just use re.fullmatch
hollow citrus
swift sparrow
#

2 things. You need to parse the cd to get the actual destination, and you also can't cd into a file

hollow citrus
#

oh if i cant cd into a file then how do i do + 1 to the folder like u said earlier

mental warren
#

Hey guys, I had a small doubt.

I was working on a project and I'm trying to import a file into all of my other files. But its keeps on saying that they can't find the file.
GPTs saying that I must include an empty __init _ _.py file into all the directories to make it work.

Can anyone explain why?

swift sparrow
swift sparrow
#

if they type cd other_folder then the goal is to cd into other_folder

#

if you just take their input directly then you're trying to cd into a folder named "cd other_folder"

slender urchin
hollow citrus
#

ok il figure this out later gotta join a zoom for smth

white knot
swift sparrow
#

it's no longer necessary to import from it though. Only if you want to import the package name itself

spice hill
slender urchin
hollow citrus
mental warren
swift sparrow
slender urchin
white knot
#

Why not keep the common file in something called util in root and then i think all other files can import it

mental warren
#

Alright, Thanks for the help.

white knot
#

Why the -m flag

warm girder
white knot
#

I see we use it with venv too

spice hill
eternal glen
spice hill
eternal glen
#

am sober, but not caffeinated

#

maybe that's my error

#

I never use VERBOSE

tepid seal
#

Hey could anyone help me I can't import a module into mu

slender urchin
#

I already failed at 4 😔

pallid garden
#

i didnt even pass 1...

spice hill
eternal glen
#

as a former Perl programmer, that was the expected behavior for me, and I didn't know about \A and \Z

swift sparrow
eternal glen
#

but I'll probably remember to use re.fullmatch in future so 👍

spice hill
#

the name of re.match is definitely one of my pet peeves of all time

eternal glen
#

I always write re.match when I mean re.search (Perl, again, probably)

#

in fact I did that yesterday

#

(but I still got the question right, somehow)

tepid seal
#

It's open @swift sparrow

spice hill
# charred tusk But it matches

It is specifically a prefix match, so re.match("foo", "foobar") produces a match, but re.match("foo", "a foo") doesn't

#

it is occasionally useful, but it's probably not what you want

swift sparrow
slender urchin
spice hill
#

oh crap, you're right

#

I don't know if it makes it better or worse

#

thank you

slender urchin
#

It seems to match charcters from the decimal number category in unicode

spice hill
#

"²".isdigit() is True but "²".isdecimal() is false...

verbal parcel
#

Can we crack a exo file without the key?

granite wyvern
slender urchin
#

!rule 5

edgy krakenBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

verbal parcel
pallid garden
#

no

slender urchin
#

And i'm just pointing you to the rules saying we don't talk about that stuff here

spice hill
verbal parcel
pallid garden
#

it's not possible

spice hill
rare gazelle
#

helu

upper canopy
#

guys how do u split a number with decimals?

like if input = 12.75

how to split 12.75 to 12, 75

upper canopy
slender urchin
#

Do you have to use math, or can you use string operations

upper canopy
#

I want to keep dividing a number, let's say 75, while it is > 0

which results in:
75.0
37.5
18.75
9.375
4.6875
2.34375
1.171875
0.5859375

But, I want to make it to where it divides to 37.5
ignores the .5 in 37.5
divides 37
into 18.5

and same process repeats

#

until it meets 0.5

upper canopy
spice hill
#

!rule 6 @hoary scaffold Whatever it is, you can't advertise on this server.

edgy krakenBOT
#

6. Do not post unapproved advertising.

spice hill
slender urchin
charred tusk
#

@mods i — dammit fix I’m tired, at least let me get the words out so I can feel useful

pallid garden
#

:3

upper canopy
charred tusk
pallid garden
#

threatening other members... mods ban this person

upper canopy
#

judging from that maybe u know what I'm trying to do

spice hill
upper canopy
#

so I'd like to ask how do I do all of those functions

spice hill
upper canopy
spice hill
upper canopy
#

give me a sec

upper canopy
hoary scaffold
spice hill
upper canopy
spice hill
#

yes

#

it's a fancy name for "remainder"

spice hill
upper canopy
brisk gazelle
#

For example, the number of deer remaining after deer season is called the remaindeer.

upper canopy
#

because I'm not going to dive into something too complex for a student on his 4th week of python

spice hill
upper canopy
spice hill
#

That's going to be a repeated fraction in binary is what I'm saying

upper canopy
#

hmmm

spice hill
#

1.(00011) specifically

upper canopy
#

we're tasked to also limit it to 4 decimal places

#

like converting 1.1 to binary will be 1.0001

#

@spice hill so quick question, if it is currently 7:08pm, and the deadline is in 12 hours, do u think it is still possible for me to finish this entire assignment

spice hill
paper panther
#

Simeone gave me brainrot

upper canopy
#

@spice hill

#

I did it

#

but its in
1
0
1
0
0
1
0

#

wait the last digit is wrong

zenith lintel
#

is there a python equivalent or analogy for struct in C?

#

I'm trying to follow something but it's in C and I don't really know it

#

is it like a dataclass?

craggy willow
#

yeah, a dataclass is close enough

zenith lintel
#

alright, thanks

rare gazelle
upper canopy
zealous owl
#

Guys if anyone here has an arduino or something similar is it reasonable to buy a cheaper clone first to learn

rare gazelle
upper canopy
#

but it keeps infinitely printing 0

#

if I put 75

#

guys I really need help

#

assignment is due soon

visual juniper
arctic lodge
#

hello

#

chat

#

pythoners

rare gazelle
rare gazelle
upper canopy
arctic lodge
#

yoo anyone want to rate my projects??

upper canopy
#

im focusing on integers first

visual juniper
#

next time maybe dont wait untill the very last hour to do the assignment 💀

upper canopy
#

or maybe help me with some bugs

visual juniper
upper canopy
#

ok

rare gazelle
arctic lodge
#

HELLOOOO

visual juniper
rare gazelle
#

the while loop needs indentation but it looks valid

arctic lodge
#

my beginner projects

upper canopy
visual juniper
upper canopy
#

problem is it cant handle decimals anymore

arctic lodge
rare gazelle
#

just do this:


while DeciBin > 0:
    if DeciBin % 2 == 0:
        print("0")
    else:
        print("1")
    DeciBin = DeciBin // 2

instead

#

the division afterwards

visual juniper
rare gazelle
arctic lodge
visual juniper
short spire
#

hi

visual juniper
#

hello

cerulean ravine
visual juniper
arctic lodge
arctic lodge
visual juniper
rare gazelle
#

laughing is healthy

cerulean ravine
arctic lodge
brisk gazelle
#

Indeed, advanced code is less likely to recieve reviews. People are going to look at it and go, "Nope!"

#

Whereas simpler, more conceptually accessible code is liable to have more takers.

rare gazelle
#

yea also if u focus the thread on a specific section it's better

upper canopy
rare gazelle
#

on the specific problem you're facing, what lines of code it likely lies in

rare gazelle
jagged dragon
#

.

jagged belfry
#

To review code, first you have to read it, then you have to understand it

#

The harder it is to read or understand code, the harder it is to review it, and the less likely someone will dedicate the time

pallid garden
#

i guess saying it's unreadable isnt really a review

oblique spindle
jagged belfry
#

"This code is unreadable, I cannot validate it. Code in our codebases has to be readable, rejected"

#

In nicer words

#

Usually I just point to spots that are gnarly and ask them to explain it. They can't, and, well.. that's a rejection

white knot
#

Should i use comments

#

i forget

#

All my projects are just small

slow rivet
#

comments should rarely be used, but doesnt mean you shouldnt use them.
now docs on the other hand

#

comments should generally explain the why not the how.
and in genrally if you need to explain the why the code could likely be written more clearly instead

cerulean ravine
white knot
#

Hmm whar about like docstring for a function

#

Like explain what the function does

cerulean ravine
#

ideally the code is understandable without them, but often that is not the case.

slow rivet
cerulean ravine
#

they help you think about what the function does

white knot
#

yeaa ok

slow rivet
#

(and ofc the title is a bit clickbaity )

oblique spindle
bright mauve
limpid meadow
#

Admittedly, that's something I'm terrible at, commenting or docstrings. It does make it harder to resume a project after a break

proud nacelle
slow rivet
#

(the trap is getting into the habbit of always writing that kinda explanatory comments once you dont need them anymore )

proud nacelle
#

If you start using variables for a ton of things that aren't necessarily needed in embedded programming for example what he says in the beginning of the video can become an issue

limpid meadow
#

Good naming can help a lot with code readability

slow rivet
oblique spindle
#

I mean 99% of The Time , It's better having Magic Values and Have a Constants File.

proud nacelle
silver plover
slow rivet
#

right, but shouldnt most compilers elevate variables to registers if they can

oblique spindle
proud nacelle
bright mauve
#

on something like an arduino, you have about 2KB to work with

#

or less depending on the model

slow rivet
daring badger
#

is there an ipc guide thats a video rather than documentation?

oblique spindle
bright mauve
bright mauve
oblique spindle
#

I remember learning in C that the stack is ≈ 8 Mb

bright mauve
#

it's also an issue at larger scales

oblique spindle
#

Idk About Python

daring badger
oblique spindle
bright mauve
#

e.g. i work on regular computers and compute clusters, but the stuff i need to move around is petabytes large

proud nacelle
bright mauve
#

so sometimes it's simply better to compute things on the fly, repeatedly. slower, but otherwise impossible

#

and naturally that complicates the logic. even worse when generating on the fly involves a lot of math. no amount of clear code and nice variable names will help if the math is involved

bright mauve
#

otherwise math papers and books would be just equations, no text

proud nacelle
#

I've uploaded super simple programs to an Arduino I got laying around here somewhere and it filled out so easy KEKW

daring badger
bright mauve
#

ah yeah, to make matters worse, the variable space is also shared with the code space

#

long code means even less space for your variables

proud nacelle
#

My ESP for school projects that are rather simple I've also gotten rather close to maxing it out on space, which isn't anything special on it's own

proud nacelle
daring badger
#

xd

bright mauve
#

i've maxed it out doing audio processing

#

say you wanna do some FFTs directly on the microcontroller. you reap benefits by FFTing more samples at a time because of the NlogN complexity

#

but only if you work with powers of 2. grabbing 1024 samples at a time will already give you something to think about on an arduino, whereas your computer can churn through vectors with millions of elements

proud nacelle
#

I guess library's might take a chunk as well PepoG, never really thought about that

#

Some library's you use in embedded for simple stuff are gigantic because it supports a wide range of hardware

dusk adder
cerulean ravine
slow rivet
dusk adder
#

the other thing that he didnt talk about that comments are good for is to explain what a section of the code does
if you have a long function, it helps to break it down with comments to explain what each section is doing
you could technically extract it to multiple different functions, but especially if youre involving a lot of variables in each step, it doesnt add a lot of readability

slow rivet
#

(I often tend to use log calls to denoate sections)

waxen grotto
#

Is there someone who use CodeSnack ide here

dusk adder
slow rivet
#

but also you can in general split up a function if you are smart about it, ofc that does depend on what its doing

dusk adder
waxen grotto
dusk adder
#

idk what codesnack is

ruby sable
#

heyy, i know this question is probably asked every ten minutes but how did yall learn python and do you recommend the way u chose

dusk adder
slow rivet
waxen grotto
golden mortar
dusk adder
waxen grotto
slate swallow
#

Hi. I'm new to Python (only a few weeks in, and haven't been practicing often) and I feel like I can't do the problems assigned to my class. Where can I find a video series about python and maybe a website for challenges?

dusk adder
golden mortar
# slate swallow Hi. I'm new to Python (only a few weeks in, and haven't been practicing often) a...
waxen grotto
slow rivet
slate swallow
ruby sable
golden mortar
waxen grotto
proud nacelle
#

'252 results'

dusk adder
charred tusk
dusk adder
slow rivet
#

but then shouldnt also the function doc string already have specified/explained what the return value is?

dusk adder
golden mortar
ruby sable
golden mortar
# ruby sable what do you mean by "haphazard way"

As in, I didn't study it in a structured and consistent way, I just looked stuff up here and there when I needed it, and I sometimes there would be months passing by without me even using Python. That's definitely not something I'd recommend for someone who just started learning their first programming language.

dusk adder
golden mortar
golden mortar
# ruby sable and what would you recommend??

The most effective way to learn Python is incremental and practice-driven. Start with a structured introductory course that covers the basics (syntax, control flow, data structures), and actively do the exercises or small projects alongside it to apply what you learn immediately. Once you’ve completed that foundation, shift your focus to building your own projects, starting small and gradually increasing size and complexity. Real learning happens when you repeatedly encounter problems, try to solve them, and fill in the gaps in your understanding as they arise.

ruby sable
golden mortar
#

All of them are good

ruby sable
#

also are you prepared for questions like this every time beacuse you answered my question in like 3 seconds 😂

ruby sable
proud nacelle
golden mortar
#

Maybe I should make some kinda tab-complete tool or something

dusk adder
# slow rivet but then shouldnt also the function doc string already have specified/explained ...
def normalized_euclidean_distance(p1: tuple[float, ...], p2: tuple[float, ...]) -> float:
    """
    Compute the Euclidean distance between two points and normalize it
    by the dimensionality of the points.

    Returns: Euclidean distance divided by the number of dimensions,
        which allows distances to be compared across spaces of
        different dimensionality.
    """
    squared_diffs = [(a - b) ** 2 for a, b in zip(p1, p2)]
    sum_of_squares = sum(squared_diffs)

    # This expression would be unclear if returned inline
    normalized_distance = (sum_of_squares ** 0.5) / len(p1)

    return normalized_distance
```counterexample
ruby sable
#

and btw what is git and what is github for in general

proud nacelle
slow rivet
bright mauve
golden mortar
# ruby sable and btw what is git and what is github for in general

Git is a version control system for code. It basically lets you keep track of all previous versions of your code, so you can roll back changes to previous versions as needed. It also allows for having branching alternative histories. Github is a platform that lets you host Git repositories (basically codebases) on the cloud.

golden mortar
#

based on the contents of the snippet

harsh swallow
#

Advertising is not permitted here

dusk adder
golden mortar
#

So Git is a software that you can run locally on your computer or on a server, and different instances of the software can communicate with other instances over the internet. Github is a web service that provides access to and hosting for Git.

golden mortar
dusk adder
golden mortar
#

That's why it's completely ubiquitous.

#

Virtually everyone uses it.

harsh swallow
#

Also nothing at that profile is related to python, and it's all clickbaity "most beginners confuse this" or "most people get it wrong"

dusk adder
#

i wish we had a better-than-git thing tbh

golden mortar
#

I like Git.

bright mauve
#

dropbox 🧠

hoary stone
#

@harsh swallow

dusk adder
#

dropbox does not compete with git at all

hoary stone
#

@harsh swallow it is beginning of something u can't even imagine....

bright mauve
# dusk adder dropbox does not compete with git *at all*

you would think that, but you'd be mistaken. because people like using overleaf instead of writing latex locally, and overleaf syncs and backs up edit history automatically with dropbox, but requires manual commands with git

dusk adder
# golden mortar I like Git.

i dont like how overcomplicated it is
i mean why do we need two different ways to handle conflicts - rebase and merge?
why do i need to resolve conflicts before i can commit my code? what if i wanna do it tomorrow morning?
it's not the final form of version management i feel

bright mauve
#

(yes, latex writing is a big standard usecase for git)

dusk adder
#

uh... latex writing specifically?

#

what's overleaf?

bright mauve
#

an online latex ide that allows realtime collaboration

golden mortar
dusk adder
#

collaborating on a latex document sounds like a nightmare
that's why i prefer typst tbh

bright mauve
#

there's no difference in the usecase, except that typst has less support 😛

dusk adder
#

but it's less abnoxious to write

golden mortar
#

And I mean, if you wanna resolve conflicts tomorrow, wait with doing the merge until tomorrow?

bright mauve
#

imagine you'Re writing a 30 page typst document with 10 people and need to track changes

dusk adder
golden mortar
#

You can commit your changes on a different branch until then.

upper dirge
#

is there a way to avoid exec here?

[exec("z[x]=' '")for x,v in enumerate(z)if ...]```
golden mortar
#

You can do one and not the other.

tropic temple
rapid bridge
#

I'd strongly avoid shared branches in git, everyone should have their own branches which then merge separately from any specific commit

#

If you commit to a branch only you have, conflicts don't happen

golden mortar
dusk adder
slender urchin
golden mortar
rapid bridge
#

Jj isn't a Google project unless something changed very recently

upper dirge
golden mortar
dusk adder
slender urchin
golden mortar
#

Conflicts only happen when you merge the main branch into your feature branch.

slender urchin
#

wait that's not how that works

harsh anchor
upper dirge
#

it's so I can make it all one line

proud escarp
slender urchin
#

z = [i if ... else v for i, v in enumerate(z)]

warped crypt
#

wanna make email automatically generetor.

slender urchin
#

Wait you are not even using the i
z = [' ' if ... else x for x in z]

harsh anchor
upper dirge
#

this is the full thing

import sys
z=[*sys.argv[1].replace(*" .")]
for i in range(250):
    [exec("z[x]=' '")for x,v in enumerate(z)if v=="."and sum(1for y in[z[x+1],z[x-1],z[x+52],z[x-52]]if y in"# ")>2]
print(*z,sep="")```
#

so I do need the i

peak relic
#

!rule ads are not allowed

edgy krakenBOT
#

6. Do not post unapproved advertising.

dusk adder
# golden mortar If you work in a feature branch in git, you don't have to worry about conflicts ...

eventually youll need to merge it into main or rebase it or whatever
if you just want to pull the latest update, i dont think it should ever throw you into a merge
it's a different system, im not sure im doing the best job explaining
my point is that there are pain points in git. i dont like it personally. i wish i didnt need to think about branches and merge conflicts and spiraling into these long and elaborate merge tasks when i just want to do something basic like pulling code

slender urchin
#

yeah no need for exec, just if/else with ' ' and v

harsh anchor
bright mauve
dusk adder
golden mortar
harsh swallow
tropic temple
#

oop actually

#

it's a little smaller. i forgot the whitespace in the indexing

rapid bridge
#

If you want the latest updates in git, you should git fetch

#

Git pull is just git fetch, followed by a merge/fast-forward/rebase depending on config

dusk adder
cerulean ravine
rapid bridge
#

You can IIRC detach to remote branches

white knot
#

hi

rapid bridge
#

So you could just git switch -d origin/main to get the up to date code (as long as it wouldn't discard your local changes)

#

Jj is better here in that it just has your local changes automatically

dusk adder
#

that's another thing.. git has a ton of subcommands
like a ton

tropic temple
dusk adder
#

ive been using git for years and i still dont understand half of the features

rapid bridge
#

Git is very complex, that is true

#

I'd be surprised if most experienced git users could run git am first try correctly from memory

dusk adder
#

i think we can do much better than that
i understand why git is so popular, it was just better than what the ancient ones had before
but like... i dont need all that archaic complexity that's very fine-tuned for mailinglists

rapid bridge
#

Well, Kernel devs definitely could

golden mortar
dusk adder
#

there's no point being the only one using some version control tool 🤷

cerulean ravine
rapid bridge
#

The key question with jj is whether it'll keep its superiority as it grows more features

harsh anchor
dusk adder
#

whenever i work with people i try to use the same tools as they are, it reduces friction

cerulean ravine
golden mortar
dusk adder
rapid bridge
#

JJ removes the staging area, adjusts defaults in a way that is friendlier to common workflows, and has a more reliable undo. It also makes an effort to make it difficult to lose work

proud escarp
harsh anchor
#

git seems terrible until you have to use perforce

cerulean ravine
golden mortar
dusk adder
#

i dont doubt that we can have it worse than git 😅

harsh anchor
cerulean ravine
golden mortar
rapid bridge
#

It's important to keep in mind that git did beat all version control Software that came before it, yeah

harsh anchor
# cerulean ravine for me

there was a push to switch to git a while back at work. it didn't go anywhere, unfortunately. though some projects are on git, most code is still in p4

rapid bridge
#

You can still use SVN/CVS/...

#

And generally I think people do agree that git was indeed an improvement

golden mortar
#

git's flexibility can be an advantage as well. I'm still discovering new ways to use it in useful ways even today.

harsh anchor
#

i think git did struggle with very large repos until quite recently with MS's improvements

dusk adder
# golden mortar Hm, I can't relate to that personally, but I'm a pretty experienced user at this...

ill freely admit im not some git guru, i have to use google quite a lot to remember what's the name of that one command that lets me selectively stage different parts of a file
it's just that i also dont think i should spend so much time to explore and master this tool, when the only thing i want from it is the ability to remember all my changes, and help me syncrhonize with other people
the fewer errors i see when i do some basic operation, the happier i am

cerulean ravine
golden mortar
#

And it doesn't take that long to learn those

proud escarp
dusk adder
golden mortar
#

And if I ever need something more complex, I usually write shellscripts to make it easier to use

cerulean ravine
cerulean ravine
proud escarp
#

prob more than you think, i would be so happy if you tried that website and then told me how you felt

#

that website really made things click for me

dusk adder
# cerulean ravine yes, but it will be worth it.

it is worth it, but only because it's the tool that everyone uses. it's not something i want to learn, it's something i have to learn
i would probably be happiest if git was just less annoying, but it is what it is

dusk adder
proud escarp
#

cool but have you tried THAT one though

#

(okay im done preaching the gospel)

golden mortar
#

I think a lot of things feel more frustrating and annoying the less well you understand them.

dusk adder
proud escarp
#

crazy

dusk adder
#

no offense but playing a git game is not how i want to spend my time learning something

#

also - i hate modals
these popup windows that darken the rest of the screen and just wont go away until i click that one specific button
ugh, please webdevs stop doing this

#

at least make it so clicking outside the modal closes it

white knot
#

modals are for UX right

peak relic
#

educational games are a thing tho

white knot
#

it should go, when we click elsewhere

dusk adder
#

worst of all worlds

slender urchin
dusk adder
bronze dragon
cedar shell
#

yo i kinda need some projects to land a job.. anyone interested in collaborating?

peak relic
dusk adder
#

i like clean websites

cedar shell
peak relic
cedar shell
#

was thinking on an API with fastAPI and then some AI functionality (which I have no experience on)

dusk adder
#

do you pythoneers actually share python files nowadays?
i remember there was a time when sending someone a single .py file that does whatever was common practice
it seems the standard way people share code now is packages

visual juniper
white knot
#

for free

dusk adder
golden mortar
slender urchin
#

I don't do python much profressionally, but when I do it's short one file scripts

dreamy parrot
tropic temple
#

upload it to gists or something

golden mortar
#

If I just want to make a quick script I wrote available to other people, I'd put it on Github

white knot
#

put in pypy

golden mortar
#

Could be in a repo or in a gist

white knot
#

its easy?

half pewter
#

wooo 25hour loonies

cedar shell
dusk adder
golden mortar
#

If it's a multi-file project I'd make a repo. And I guess if the number of users started to scale up I'd consider putting it on pypi.

dreamy parrot
golden mortar
#

But that never happened so far.

dusk adder
#

i think distribution utilities only became a thing in like 2005 or something

peak relic
dreamy parrot
visual juniper
#

so when internet wasnt a thing like it is today

dusk adder
#

yes and github didnt exist

#

so sharing code was very different

visual juniper
#

i would assume almost everything was done differently in those days

#

because interenet wasnt as big and vast as it is now

so it would make sense that people only shared what was required

dusk adder
#

pip didnt exist either back then

peak relic
#

So filezilla into some common sftp prolly

spice hill
peak relic
#

oh wait... CDs was a thing

visual juniper
#

"where is my python program"
"i already shipped it through speedpost"

dusk adder
dreamy parrot
#

a file with thousands of lines isn't very clean imo

dusk adder
#

i think it is

#

it's a thing in C world too

peak relic
#

ah so its like copyparty. nice

visual juniper
#

now watch them come to the conclusion of "it depends"

visual juniper
dusk adder
dreamy parrot
#

C and the C world are very far from my notion of 'clean'

visual juniper
dusk adder
#

i recall using a single-file GUI library in C and it was great

visual juniper
#

you can still do unity builds though , thats a thing

dusk adder
#

i dont wish my greatest enemies to waddle through the make soup

spice hill
#

As much as vendoring seems cool, if it's a non-trivial project, you lose all the upsides of modern dependency management. Like getting an alert if the library you're using has a vulnerability you should patch

visual juniper
#

i mean with C/C++ , everything sucks

cmake seems to suck the least though , people like it

bronze dragon
#

I've seen many people complain about CMake lol
I haven't had a chance to try meson yet though

restive marlin
#

Need an email provider ASAP need to migrate 50 domains, any ideas

#

In talks with PurelyMail and Mailgun but need a quicker process

dusk adder
peak relic
restive marlin
#

Purely transactional

peak relic
restive marlin
#

Do they have a lengthy review process?

peak relic
#

Not sure what the review process is for. Just hook your domain in, create an API key and you're set (sorta, still need to develop for Resend API)

restive marlin
#

No SMTP relay?

peak relic
restive marlin
#

Will keep this in mind thank you

finite sigil
#

Newbie quesion.... If there is a red circle with a "1" inside it in another channel, how do I find that message for me?

bronze dragon
#

you can click the "Inbox" on the top-right of your Discord, then "Mentions"

rugged star
craggy trench
#

there's also the bell icon on the channels/servers page in mobile

finite sigil
#

I;m on desktop

finite sigil
#

Turns out it was just more insults, so I guess I didn't miss much

slender urchin
finite sigil
#

But at least now I won't miss insults when I am away!! 😉

#

And how do I give a thumbs up to a message - or can you not do that on this server?

finite sigil
slender urchin
finite sigil
#

Thanks for the help everyone

restive marlin
velvet hull
#

Hi

lusty reef
#

Why in the world did I choose audio transcription/anything audio related as part of a first project lmao

#

holy hell this is a brainfuck

pallid garden
#

you should be writing python instead

mossy sigil
#

is there a discord server for discussing AI/ML which is as active as this?

pallid garden
#

they might both be programming languages but brainfuck is significantly worse

mossy sigil
pallid garden
#

its a joke

lusty reef
#

I hate using chatgpt to help guide me through things but its quicker than asking questions in places that nobody answers lol

pallid garden
#

pydis is python discord

mossy sigil
lusty reef
#

don't really have a specific one atm, havent messed with this stuff in a bit.

mossy sigil
#

what's the most reputed subfield in AI? as in hard and reputable to publish in?

lusty reef
#

What I'm trying to accomplish though is even a basic working AI assistant, which I had working for a moment but it was giving me phantom transcriptions

#

i worked on adding webrtcvad and it muffed everything up, ended up losing the code I had before out of frustration

pallid garden
#

sounds difficult

harsh anchor
pallid garden
#

maybe you should try something so the difficulty curve is not that steep

lusty reef
#

that would bore me to pieces making things that i have no use for/interest in, tbh

mossy sigil
lusty reef
#

id lose interest in even trying at that point

cold bronze
#

Hello all :) I'm having a bit of an issue with incremental names, I have a list of names:

basename > basename_01
basename.001 > basename_02
basename.002 > basename_03
and so on...

this is the end result I'm trying to achieve, but i have no clue how to approach it

harsh anchor
#

filenames?

pallid garden
#

why does basename.001 get turned into basename_02?

bronze dragon
#

because basename gets that spot

cold bronze
# harsh anchor filenames?

its names in blender, with anything, if theres a duplicate of an object, it adds .00N and goes up but .001 is the second object not the first

cold bronze
pallid garden
harsh anchor
bronze dragon
#

oh sorry lol

cold bronze
#

Hmm

pallid garden
#

what does basename.012 get mapped to

cold bronze
pallid garden
#

why?

cold bronze
#

because its the numbers + 1

pallid garden
#

how did you get 12 from basename.012

#

which part of the filename did you look at to get the number

#

how did you tell that it is part of the number sequence and not the filename

pallid garden
#

how do you tell which part is the suffix

cold bronze
#

anything after the .

pallid garden
#

ok...

#

how do you do that

#

in code

#

you can google

cold bronze
#

oh ok ok

pallid garden
#

"how to split string at character python"

dim pagoda
#

What can i do with beatifulSoup

pastel sluice
#

@pallid garden you can also use pathlib to get the parts of a filename (cross-platform)

cold bronze
pallid garden
#

ok...

#

so, 012 is a string of characters

#

and 12 is a number

cold bronze
#

ohhhh

pallid garden
#

how do you turn a string of characters into a number

astral patrol
#

Hii

pastel sluice
#

int(), typically

pallid garden
#

come on

#

im trying to guide them

pastel sluice
#

sorry, I misread the context

proud escarp
pastel sluice
#

(my window was only showing me the last couple of msgs)

pallid garden
#

anyway, now that we got our 12

cold bronze
pallid garden
#

@cold bronze how do you turn 13 into basename_13

bronze dragon
#

The Socratic Method vs pydis' will to answer every question it can

pastel sluice
#

And some kind of help is the kind of help ... we can all do without

steep gyro
#

Are expressions and operations same things?

proud escarp
hollow citrus
#

Traceback (most recent call last):
File "C:\Users\liebe\OneDrive\programming\ls_project\main.py", line 9, in <module>
for file in file_or_dir.iterdir():
~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\liebe\AppData\Local\Programs\Python\Python314\Lib\pathlib_init_.py", line 836, in iterdir
with os.scandir(root_dir) as scandir_it:
~~~~~~~~~~^^^^^^^^^^
NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\Users\liebe\OneDrive\programming\ls_project\main.py'

can someone help me understand whats wrong

cold bronze
pallid garden
hollow citrus
pallid garden
#

so we can use basename

steep gyro
pallid garden
hollow citrus
# pallid garden well, whats the error

NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\Users\liebe\OneDrive\programming\ls_project\main.py'
smth to do with this i think

pallid garden
#

what does it say

#

read it aloud

hollow citrus
#

notadirectoryerror

pallid garden
#

ok...

hollow citrus
#

😭

pallid garden
#

and?

hollow citrus
#

the name is invalid

pallid garden
#

there's still more

pallid garden
#

why is the name invalid?

hollow citrus
#

C:\Users\liebe\OneDrive\programming\ls_project\main.py idk why its getting rid of \ in my messages

cerulean ravine
hollow citrus
cerulean ravine
hollow citrus
cerulean ravine
steep gyro
#

In python are expressesions and operations the same thing?

hollow citrus
cerulean ravine
hollow citrus
#

Traceback (most recent call last):
File "C:\Users\liebe\OneDrive\programming\ls_project\main.py", line 13, in <module>
for file in file_or_dir.iterdir():
~~~~~~~~~~~~~~~~~~~^^ smth wrong here

proud escarp
# steep gyro I am not able to understand first two points?

so binary means two, right?
in maths, and in python, a "binary operation" is an operation involving two operands (basically, variables) and one operator (like +, -, *, /)

so an example of a binary operation would be: 1 + 2 or 3 * 4
there are also unary operations like -1 where - is the operator and 1 is the operand

an "expression" is just something that evaluates to something, think of it as things that can be assigned to a variable
x = 5 + 2, the 5 + 2 is an expression

but x = return 5 wouldnt work because return 5 is not an expression

cerulean ravine
hollow citrus
#

oh i see the problem

pallid garden
#

you'd be surprised how good python's error messages are once you see other languages

cerulean ravine
hollow citrus
#

but i still want to be able to cd on it shouldnt i? or should i leave it like this

Enter a folder name: ls_project
ls
.idea
.venv
main.py
programming

without trying to cd now into .idea .venv

pallid garden
#

there are some languages with errors which are completely indecipherable

hollow citrus
#

should i leave it like this or try to workarund not cd on main.py

pallid garden
bronze dragon
hollow citrus
#

to lazy to finish the sentence xd

pallid garden
# hollow citrus call direct-

opening a file is very different from changing to a directory, despite both of them being a double click in the GUI

bronze dragon
hollow citrus
#

PS C:\Users\liebe\OneDrive\programming\ls_project> cd .venv
PS C:\Users\liebe\OneDrive\programming\ls_project.venv> cd
PS C:\Users\liebe\OneDrive\programming\ls_project.venv> cd
PS C:\Users\liebe\OneDrive\programming\ls_project.venv> ls

Directory: C:\Users\liebe\OneDrive\programming\ls_project\.venv

just tryna do smth like this

cold bronze
ruby sable
#

is brocode good for python?

pallid garden
hollow citrus
#

else:
for file_or_dir in current_folder.iterdir():
if file_or_dir.is_dir():
for file in file_or_dir.iterdir():
print(file.name)
else:
print("Not a directory")
figured it out

cold bronze
hollow citrus
#

no more errors only focuses on my directs

robust ledge
ruby sable
cold bronze
bronze dragon
cold bronze
pallid garden
pallid garden
#

umm so this is a special case right?

#

when there is no suffix and no .

cold bronze
#

yeah!

pallid garden
#

there are a few ways to solve this

hollow citrus
#

Enter a folder name: programming
ls_project
.idea
.venv
main.py

im almost done my cd/ls program yippe

bronze dragon
#

@cold bronze question, can the basename ever have an extension of its own? like image.jpg.001 etc

cold bronze
bronze dragon
#

and then you'd have basename.L.001, basename.R.001, and so on?

cold bronze
#

yes exactly

cold bronze
pallid garden
#

the numbering is always the last segment right?

pallid garden
#

how do you get the last segment of a list?

cold bronze
#

cause its an index

pallid garden
#

yup

velvet hull
cold bronze
#

so i can check if the last element is an integer!

pallid garden
cold bronze
ruby sable
#

is brocode good for python?

pallid garden
bronze dragon
ruby sable
harsh anchor
subtle coyote
ruby sable
cold bronze
hollow citrus
#

on line 17 i do current_folder = Path(current_folder) / split_ls_cd[1]

and on line 8 i have

current_folder = Path(origin_folder) / location

it will overwrite line 8 right the variable(thats what i want it to do)

subtle coyote
pallid garden
bronze dragon
cold bronze
subtle coyote
#

type

pallid garden
#

when you split the filename, each segment is a string right?

harsh anchor
pallid garden
#

they are not integers yet

bronze dragon
ruby sable
cold bronze
#

or false

subtle coyote
#

try it

cold bronze
#

cause its a string

pallid garden
# ruby sable why

we think brocode encourages people to copy code instead of understand what the code does

harsh anchor
#

why would you say "we"

subtle coyote
#

its an organization of a bunch of ppl

pallid garden
# ruby sable hmm fair

the evidence being people coming into this server having copied the code incorrectly and not being able to understand the error they are getting

ruby sable
#

is python THAT hard?

pallid garden
cold bronze
bronze dragon
ruby sable
#

my school teacher is ass

zealous lion
#

I think copying code is just a stage of learning. I certainly had a copying phase when I was starting out

harsh anchor
#

real

pallid garden
#

i copied code, and then toyed with them to see what happens when i change something

subtle coyote
pallid garden
harsh anchor
pallid garden
zealous lion
subtle coyote
harsh anchor
pallid garden
clever iris
#

Does anyone here know if it’s possible to look at like TikTok’s http request and see why they’re giving an error message for something specific in the app?

zealous lion
subtle coyote
#

yeah my friend was changing box size pos color..

subtle coyote
#

dk if he was learning anything tho

frosty oriole
velvet hull
zealous lion
subtle coyote
#

interesting

clever iris