don't run `python my/script.py`! (beginner - intermediate) anthony explains #407

don't run `python my/script.py`! (beginner - intermediate) anthony explains #407

anthonywritescode

2 года назад

19,551 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

pward17
pward17 - 26.08.2023 18:11

currently my program is working. But ill try to do this and see if something changes

Ответить
Voice of Treason
Voice of Treason - 26.05.2023 00:08

I'm still going to do it. my python projects are all one big script anyway

Ответить
Kent
Kent - 17.05.2023 21:10

I just spent like 5 hours trying to get my imports working without modifying the sys path directly. This video is exactly what I was looking for. Thank ya!

Ответить
Albert J. Black
Albert J. Black - 13.04.2023 05:49

what is the best way professionals deal with this? I want to learn the proper way so I can Implement it on my project. Thanks Anthony!

Ответить
GrahamAtDesk
GrahamAtDesk - 22.03.2023 07:46

I don't think the cwd should be on the import path; as the author of an import statement I want to know that the code I intend to import hasn't been overridden by the presence of a random module in somebody's current directory. The very idea that it would do this is slightly terrifying!

Ответить
John Brown
John Brown - 06.02.2023 20:40

Great video, honestly something I've been wondering for over three years and never really got to the bottom of.

Ответить
Paolo Ghezzo
Paolo Ghezzo - 16.01.2023 17:14

Thanks Anthony, this is always useful! I just keep coming back to a video I have seen of yours whenever I run into these situations in "real life examples"

Ответить
张紫
张紫 - 08.12.2022 05:00

Thanks for the detailed explanation!!! I already subscribe to your channel!!!

Ответить
Joe Li
Joe Li - 15.11.2022 12:51

Very helpful! I spent several hours to solve this problem, and I finally solve it with your method!

Ответить
Squeemos
Squeemos - 05.11.2022 09:51

I gotta be honest, after coding in Python for 3 years, your videos are always something I keep coming back to for little things here or there. It'll be like "I remember Anthony had a video on this... what did he say to do again?"

Ответить
Muhammad Bilal Shahid
Muhammad Bilal Shahid - 19.08.2022 08:26

Amazing work friend

Ответить
Abdulhamit Kumru
Abdulhamit Kumru - 08.06.2022 11:22

great video as always, thank you

Ответить
Hugo Carr
Hugo Carr - 22.03.2022 02:35

Would replying to a JIRA ticket with a YT video be passive aggressive? Asking for a friend.

Ответить
Tadassa Tafarra
Tadassa Tafarra - 17.03.2022 10:49

Anthony ur the mann
Grate video with very useful info

Ответить
Kurian Benoy
Kurian Benoy - 16.03.2022 22:51

Is it why python3 -m pip install package recommended?

Ответить
e1nste1in
e1nste1in - 16.03.2022 22:28

Took me also a while to figure this out.

Ответить
michalski
michalski - 16.03.2022 14:59

that fancy keyboard is just begging you to use vim

Ответить
BOT MAN
BOT MAN - 16.03.2022 09:50

literally me crying why .. and . imports dont work

Ответить
cat boy
cat boy - 16.03.2022 07:49

Im sure at somepoint, ill understand what he explained. lol

Ответить
Hugh Mungus
Hugh Mungus - 16.03.2022 06:07

I can’t be the only one looking at the keyboard and not his screen.

Ответить
Artak Kirakosyan
Artak Kirakosyan - 15.03.2022 21:07

Anthony, thank you so much for making these videos.
I have been doing PYTHONPATH for my whole life and never suspected there might be something wrong there.
If I can be helpful for any of your project, just let me know.
Your videos are wonderful, keep the good job

Ответить
b0rk
b0rk - 15.03.2022 06:21

"$PYTHONPATH is almost always wrong" should be a tattoo

Ответить
b0rk
b0rk - 15.03.2022 06:15

WHY AREN'T MY IMPORTS WORKING

Ответить
Essam Gouda
Essam Gouda - 14.03.2022 22:24

Thank you for another great video ! Very informative.

Ответить
Nehal Kamat
Nehal Kamat - 14.03.2022 18:09

Is venv your virtualenv generator of choice? What are your thoughts on poetry/pipenv/pdm?

Ответить
David Dellsperger
David Dellsperger - 14.03.2022 18:07

don't run, I agree. In all seriousness, I've not really run into this problem, but maybe that's because I just monoscript for console script like stuff, or use _file_ vs. os.cwd when trying to deal with paths of things, but it's been a while since I've had to do any of that kind of stuff.

Ответить