Тёмный
No video :(

WHAT Is "Glob" In Python?! (It's Actually Very Useful!) 

Indently
Подписаться 198 тыс.
Просмотров 39 тыс.
50% 1

WTF is the glob module in Python, and how can we use it in our code?
▶ Become job-ready with Python:
www.indently.io
▶ Follow me on Instagram:
/ indentlyreels

Опубликовано:

 

19 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@blevenzon
@blevenzon Год назад
Ananas is pineapple in my language. Hmmm. Awesome video live your content I recently found ya and subbed
@Rizzstech
@Rizzstech Год назад
Ananas is pineapple in many languages, the English pineapple being the anomaly
@tfr
@tfr Год назад
@@Rizzstechindeed correct. strange how english is like this 😆
@hamzabiswas8632
@hamzabiswas8632 Год назад
In mine it's anarosch and I'm bangali
@s.a.2571
@s.a.2571 Год назад
Not that weird. In spanish it is piña
@Rizzstech
@Rizzstech Год назад
@@s.a.2571 yet the South America countries that speak Spanish also use ananas
@turboblitz4587
@turboblitz4587 Год назад
Nice Video! It feels like glob rules and regex is pretty much the same, but there are actually many differences. The strange thing is you don't notice them when working in the domain of directiories, so it feels very natural to use the glob rules. The whole video I was thinking "Wait what is different from regular expressions here?"
@kreuner11
@kreuner11 Год назад
The biggest difference is that the dot is not an "any character" symbol
@KaFuMan
@KaFuMan Год назад
been using subprocess to do the same thing, glad youtube algorithm showed me this :D
@SabahMahjabeenSarwar
@SabahMahjabeenSarwar 3 месяца назад
Very informative! thanks for the wonderful content ,explained in eloquent manner.
@grzegorzryznar5101
@grzegorzryznar5101 Год назад
Man, I like your videos very much. Great work!
@himalkarkal6355
@himalkarkal6355 4 месяца назад
Thanks so much. Saved me so much manual work!!!
@duerdum9
@duerdum9 Год назад
Use next(globs) instead of globs.__next__(). Calling private functions outside the class is bad practice.
@davidlioner4332
@davidlioner4332 Год назад
Dunders methods != private methods
@duerdum9
@duerdum9 Год назад
@@davidlioner4332 while that is true. Python doesn't really have the tradition concept of private methods. Dunder methods are the closest to it. If it was truly private, the call wouldn't even work. The point still stands.
@Lord_Shan
@Lord_Shan Год назад
Thank you. Didn't know about "iglob". It will help you at work.
@allo5668
@allo5668 Год назад
I’ve transitioned to only using Path.glob() since often I need to import Path anyway, and now I need 1 fewer import. I basically never import glob anymore
@thatsunpossible312
@thatsunpossible312 Год назад
Yes! I just transitioned to pathlib this week after resisting forever. What sold me was using the division operator “/“ instead of os.path.join all the time. Now I realize that I often don’t need os, sys, and glob imports.
@rantalbott6963
@rantalbott6963 Год назад
Very handy. Thanks. Can you start the search from, say, '../' or '../../' like you can in the shell? Or do you need an absolute path?
@md.masumomarjashim
@md.masumomarjashim Год назад
You can try such trivial things on your own computer. And see if it works.
@piiissz
@piiissz Год назад
Test is important but it can be misleading. It's good to check the documentation always! The second line docs of "glob.glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, include_hidden=False)" contains the answer. Typing the answer was longer than googling the docs and checking the possible path types... :( It is your turn, find the docs instead of asking in comment! ;)
@INGIE32
@INGIE32 Год назад
I have been using glob for a long time, but I only knew the * notation, so really insightful video as always! I do have to change a lot of my code now tho :/
@barelycodingtoday
@barelycodingtoday Год назад
Your videos are all freaking fantastic
@chrislione950
@chrislione950 Месяц назад
Great video thanks
@troy5553
@troy5553 Год назад
I just found glob randomly in python and i dont know what to do with it
@Indently
@Indently Год назад
We all come across that moment ahah
@peshotod
@peshotod 7 месяцев назад
It works very well for current disc directory,but when I try different disc and capital letters folder it gives me this error: root_dir='D:\MY DOCUMENTS\NIZAR', ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 15-16: malformed \N character escape
@chalkypj
@chalkypj Год назад
Thank you, I really learn from your videos
@nextisnowmain
@nextisnowmain 4 месяца назад
Great video
@dcollett
@dcollett Год назад
Excellent video. Thanks!
@oleksandershevchenko8063
@oleksandershevchenko8063 5 месяцев назад
Cool, have not known before. Ananas is ananas in my language 😉
@SACHINKUMAR-px8kq
@SACHINKUMAR-px8kq Год назад
Thanks Sir for your Guidance
@RonaldPostelmans
@RonaldPostelmans Год назад
nice video. learned allot
@travisweedon1234
@travisweedon1234 Год назад
Man you are great!
@qondonyon
@qondonyon Год назад
Glob
@karthikd469
@karthikd469 Год назад
Awesome one
@UCSAmit
@UCSAmit Год назад
which code editor you are using?
@FilosofoDaCamera
@FilosofoDaCamera Год назад
Grande fede Grazie!
@GATEPREP
@GATEPREP Год назад
Hi! Cool tutorial.Just one sa=mall query can we use this to list all objects from an S3 Bucket?
@scullyy
@scullyy Год назад
oh my glob
@Indently
@Indently Год назад
That was exactly my reaction
@vbxiv5553
@vbxiv5553 9 месяцев назад
GLOB
@newcoolboys
@newcoolboys Год назад
Where Banana? Me sad no see banana ;(
@Luclecool123
@Luclecool123 Год назад
Mcoding like thumbnail
@gund4m
@gund4m Год назад
Ma un video in italiano quando lo farai?
@Indently
@Indently Год назад
boh :)
@gund4m
@gund4m Год назад
@@Indently daje!!
@zangdaarrmortpartout
@zangdaarrmortpartout Год назад
I always favor regex over glob, I don't like glob really much
@Indently
@Indently Год назад
They do different jobs though, no?
@Gruuvin1
@Gruuvin1 Год назад
WHAT, not wtf. Have some class.
@Indently
@Indently Год назад
You can have a class for this if you want, that’s up to you.
@Ndofi
@Ndofi Год назад
Hello Idently! Unfortunately I'm having this error, whe i run this code: CODE: import glob, pandas as pd, os print(glob.glob("**/*.pdf", path = 'C:\Users dofi.vontade\OneDrive\Ndofi\Analytics\DB', recursive=True, includ_hiden=True)) ERROR: Input In [140] print(glob.glob("**/*.pdf", path = 'C:\Users dofi.vontade\OneDrive\Ndofi\Analytics\DB', recursive=True, includ_hiden=True)) ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
@ksspqf6016
@ksspqf6016 Год назад
I won't be coding any time soon so video doesn't apply to me :(
@davizek9047
@davizek9047 Год назад
print('Thanks a lot!!')
@user-pm6qt6ee7p
@user-pm6qt6ee7p 5 месяцев назад
Great video
Далее
6 CLEAN Tips To IMPROVE Your Python Functions
9:55
Просмотров 76 тыс.
10 Important Python Concepts In 20 Minutes
18:49
Просмотров 39 тыс.
Rusiya Prezidenti Vladimir Putin Bakıdadır
00:32
Просмотров 245 тыс.
5 Good Python Habits
17:35
Просмотров 496 тыс.
5 Useful Python Decorators (ft. Carberra)
14:34
Просмотров 97 тыс.
Modern Python logging
21:32
Просмотров 177 тыс.
ALL 47 STRING METHODS IN PYTHON EXPLAINED
23:34
Просмотров 126 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 801 тыс.
Python OS Module | The best functions
17:46
Просмотров 18 тыс.
I've been using Redis wrong this whole time...
20:53
Просмотров 352 тыс.