Тёмный
No video :(

Understanding stdin, stdout, stderr in Python 

NeuralNine
Подписаться 362 тыс.
Просмотров 13 тыс.
50% 1

Today we learn about the standard streams stdin, stdout and stderr as well as how to use them in Python.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine...
💻 The Algorithm Bible Book: www.neuralnine...
👕 Programming Merch: www.neuralnine...
💼 Services 💼
💻 Freelancing & Tutoring: www.neuralnine...
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine...
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/Neu...
🎙 Discord: / discord

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

 

19 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@paulthomas1052
@paulthomas1052 11 месяцев назад
250K Subs - congratulations - this has always been a great channel - always informative and interesting. All the best 🤗
@user-uk7ul9ym1e
@user-uk7ul9ym1e Месяц назад
A lot of information, very good to watch after some previous videos about theory if in out and error streams in any OS.
@JorgeEscobarMX
@JorgeEscobarMX 11 месяцев назад
0:00 I'm wondering if I need this, let's see.
@rantalbott6963
@rantalbott6963 10 месяцев назад
I like to include a function function for printing to stderr so I don't need to keep typing the "file=": def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) Most of the time when you're reading from stdin, you'll want to process one line at a time. If you don't need a context manager for some other reason, you can just treat sys.stdin as an iterable: for line in sys.stdin: if len(line) == 0: # End of file. Do final stuff here sys.exit(0) line = line.rstrip() Notice the rstrip(): reading includes the terminating (CR and) LF, and you usually don't want them as part of the data.
@elenakusevska6266
@elenakusevska6266 6 месяцев назад
Useful video :) I learned something today :)
@JorgeEscobarMX
@JorgeEscobarMX 11 месяцев назад
11:00 print has a flush parameter and I can avoid the printing the new line on print function calls.
@harshavardhanlakhinana5280
@harshavardhanlakhinana5280 5 месяцев назад
Really useful
@sergiuoanes4635
@sergiuoanes4635 11 месяцев назад
very helpful! thank you
@juggerfps2402
@juggerfps2402 5 месяцев назад
thanks
@richardboreiko
@richardboreiko 11 месяцев назад
I wonder if that works with logging....
@andiglazkov4915
@andiglazkov4915 11 месяцев назад
Thanks 😊
@FOXFHEX1
@FOXFHEX1 11 месяцев назад
Good job ❤
@ConsumedKing
@ConsumedKing 11 месяцев назад
Thanks 🤍
@philtoa334
@philtoa334 11 месяцев назад
Thx_.
@Little-bird-told-me
@Little-bird-told-me 11 месяцев назад
POPos is no longer my fav distro. nvim is still running on version 6.1. You should try a WM in Arch. May be Hyprland or sway
@smartcat5989
@smartcat5989 11 месяцев назад
information , ℹ️
@abdulwaleedjulaid5491
@abdulwaleedjulaid5491 11 месяцев назад
Zoom your video blurry
Далее
Makefiles in Python For Professional Automation
13:43
MBAPPÉ 🏁🐢
00:11
Просмотров 1,4 млн
Fake Horse Tries to Blend in with Pack of Horses
00:19
СЛАДКОЕЖКИ ПОЙМУТ😁@andrey.grechka
00:11
Automatically Schedule Python Scripts with Cron Jobs
13:25
10 Python Comprehensions You SHOULD Be Using
21:35
Просмотров 140 тыс.
Garbage Collection in Python: Speed Up Your Code
16:41
What Are #! Shebangs For in Scripts?
8:40
Просмотров 4,2 тыс.
How to Capture What Is Written to stdout in Python
6:03
15 Python Libraries You Should Know About
14:54
Просмотров 382 тыс.