Тёмный

How To Run Python Scripts With The Command Prompt 

Wrt Tech
Подписаться 3,5 тыс.
Просмотров 204 тыс.
50% 1

In this video I show you how to run python scripts with the command prompt

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

 

19 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 118   
@ramziadil8613
@ramziadil8613 2 года назад
Very clear and very helpful! Thank you!
@DeepakKumar-mb2lw
@DeepakKumar-mb2lw 2 года назад
Thankyou so much it helped me a lot. I was just got frustrated after trying so many times but after watching your video it made my concept totally clear. Thanks a lot for this video 😊.
@hallucinatory.767
@hallucinatory.767 2 года назад
Thanks, your explaination was easy, clear and to the point.
@maxcattani2376
@maxcattani2376 2 года назад
Thank you! Exactly what I was looking for!
@iwpsurf
@iwpsurf 2 года назад
Clear, easy. Thanks for the vid!
@renyongsun9102
@renyongsun9102 Год назад
Short but very informative video, thank you!
@wrttech422
@wrttech422 Год назад
Glad it was helpful!
@mdshohidulhaque2523
@mdshohidulhaque2523 Год назад
very clear and concise. Thanks
@vaibhavpatil-if6lv
@vaibhavpatil-if6lv 2 года назад
Thanks...this is easiest and helpful tutorial
@TheUnaBoomer
@TheUnaBoomer Год назад
Thank you this is the best tutorial
@andrewkerfoot6442
@andrewkerfoot6442 Год назад
thanks for the video i was really struggling
@abubakarmeraj8040
@abubakarmeraj8040 2 года назад
Thanks, Very Helpful
@wildking7971
@wildking7971 Год назад
Thanks very helpful
@Kevin-rj6rf
@Kevin-rj6rf 2 года назад
brief and useful!
@user-dl6yn2nc5r
@user-dl6yn2nc5r 10 месяцев назад
fantastic and quite complete
@anushasweety901
@anushasweety901 2 года назад
Thank you so much sir 👍very useful
@srikanthcheekatla2945
@srikanthcheekatla2945 3 года назад
Superb ❤️
@darvishdavis159
@darvishdavis159 2 года назад
this helped me a lot thanks sir
@nottcath
@nottcath 2 года назад
Thanks so much for this. Was doing a training and got so lost because cmd couldn’t find my script
@wrttech422
@wrttech422 2 года назад
Glad it helped!
@bicivelo
@bicivelo 6 месяцев назад
thank you!! super easy. thanks!!!!
@mohithmohith5884
@mohithmohith5884 3 года назад
thank for the good information
@user-dl6yn2nc5r
@user-dl6yn2nc5r 10 месяцев назад
marvelous and ammazing
@pyrmontbridge4737
@pyrmontbridge4737 2 года назад
What I really want to know, how you opened that editor in the first few seconds. Also, can you call a python file from inside the interpreter?
@wrttech422
@wrttech422 Год назад
I typed idle into the search box
@shwetapandit9827
@shwetapandit9827 2 года назад
Best 👍
@xingmu999
@xingmu999 2 года назад
great content
@skakramulali6520
@skakramulali6520 2 года назад
Thanks you very much sir 😊
@nityanivdunge6428
@nityanivdunge6428 2 года назад
Thanks mate 👍
@myew8238
@myew8238 2 года назад
the output thing is super cool
@toshangkangten7070
@toshangkangten7070 2 года назад
Thank you sir 🙏
@relevant3329
@relevant3329 2 года назад
Thanks very much
@ankurbhari3367
@ankurbhari3367 2 года назад
helpful thanks man
@el-aminayinde8772
@el-aminayinde8772 2 года назад
Thank you!!!
@pritamgawde5453
@pritamgawde5453 2 года назад
Thank you 😊
@majesticraccoon4317
@majesticraccoon4317 3 года назад
tysm it worked
@afranhossain6085
@afranhossain6085 Год назад
I watched 3 videos before I got here and this was the only helpful one.
@wrttech422
@wrttech422 Год назад
thank you for the kind words
@md.sakiburrahmansakib739
@md.sakiburrahmansakib739 2 года назад
Thanks a lot.
@shrutichavanaik5782
@shrutichavanaik5782 2 года назад
Thank you so much
@AyushKumar-lp2rt
@AyushKumar-lp2rt Год назад
really helpful
@bgmi___7326
@bgmi___7326 2 года назад
Thanku bro💖
@go_jesseyu
@go_jesseyu 2 года назад
Nice, and this also works whit lua
@sharathkumar8163
@sharathkumar8163 Год назад
Super
@hansisenavirathne9670
@hansisenavirathne9670 Год назад
Thank you
@step_back_
@step_back_ 3 года назад
Thanks bro
@mohamedrikazmohamedrazick7249
@mohamedrikazmohamedrazick7249 2 года назад
Thankyou so much
@anamqureshi802
@anamqureshi802 2 года назад
Thanks!
@sagarpatel6062
@sagarpatel6062 3 года назад
Thx bro
@suhailsalem7207
@suhailsalem7207 2 года назад
thank you so much
@danieldaniels4179
@danieldaniels4179 2 года назад
Thank u 😊
@danielmoura4821
@danielmoura4821 3 года назад
Thank you man.
@DineshKumar-zn7ht
@DineshKumar-zn7ht 3 года назад
Thanq so much
@ceena8766
@ceena8766 3 года назад
thank you
@alisabah9088
@alisabah9088 3 года назад
Thank u
@aminameera9001
@aminameera9001 3 года назад
tnx
@kyzoh5491
@kyzoh5491 2 года назад
Hey! Hopefully you can answer me but, everytime I try to run my script, it always says "Somthing Went Wrong No Module Named 'Request'"
@wrttech422
@wrttech422 2 года назад
what exactly did you type in and what exactly is the error message?
@kyzoh5491
@kyzoh5491 2 года назад
@@wrttech422 So, I got it to work and fixed the "Something Went Wrong No Module Named 'Request' " problem by doing pip3 install requests. but for some reason it says the same message but instead of Requests it says "Colorama" at the end.
@redactedeagle301
@redactedeagle301 3 года назад
Thanks
@yajurvfonia2726
@yajurvfonia2726 2 года назад
fast and clear
@akhileshlad5857
@akhileshlad5857 2 года назад
thank u
@anirbellahcen5551
@anirbellahcen5551 3 года назад
thanks
@captaindanger13
@captaindanger13 3 года назад
I keep getting *python: can't open file 'test.py': [Errno 2] No such file or directory* idk why. i tried both *print('hello world')* and *print("hello world")* but I keep getting that message. I feel like there's something I'm missing...
@wrttech422
@wrttech422 3 года назад
Make sure youre changing the directory(cd) to the location of you python script. Also, make sure youre using the exact name of the script in the command prompt.
@Rex-xj4dj
@Rex-xj4dj 2 года назад
@@wrttech422 I did but it says no path specified
@mrswdishboi3343
@mrswdishboi3343 2 года назад
@@Rex-xj4dj same
@tiger6607
@tiger6607 3 месяца назад
If i want the script to stop do i just exit the cmd?
@recktrec5313
@recktrec5313 3 года назад
"Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings" help
@rivaldipprasetya23
@rivaldipprasetya23 3 года назад
Have you found a solution?
@recktrec5313
@recktrec5313 3 года назад
@@rivaldipprasetya23 yea if it says that means the script is simply wrong for example if you do print "poop" it will work fine
@sushhmasangani720
@sushhmasangani720 2 года назад
How can I get save as type as a python file
@AMustafa67
@AMustafa67 Год назад
I have an issue Run on command prompt, every time I try to run a file , it keeps take me to back toVisual studio code , instead of printing it on CMD
@Voltomess
@Voltomess 2 года назад
How do I save my little script as an exe or whatever so someone can run it as exe file and use it without having python?
@wrttech422
@wrttech422 2 года назад
i already made a video on it. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ediPe2MQzGw.html
@frankieiero6859
@frankieiero6859 2 года назад
Question: how to run your python scripts without specifying the exact location of the file? instead of C:\Users\Python> python sample.py. i want it to be: immediately sample.py or sample.exe
@myfuzzyanimals67
@myfuzzyanimals67 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-krxU5Y9lCS8.html
@Clint_Westwud
@Clint_Westwud 2 года назад
What's the full name of that song there? (If_I_Had_a...)
@wrttech422
@wrttech422 2 года назад
Lol i honestly dont remember. I think it was a royalty free song I got from the youtube music section. I used it for my python turtle videos
@sef3795
@sef3795 3 года назад
Can you do this without python installed?
@moustafamedhat7190
@moustafamedhat7190 3 года назад
no
@bright7142
@bright7142 Месяц назад
Hey! Hopefully you reply but, I correctly followed all your steps but It says "can't open file or no file in directory Please help me
@wrttech422
@wrttech422 Месяц назад
Where is your file located? If it is located on the desktop you need to change directory in cmd to the desktop.
@jo_rs
@jo_rs Год назад
Hey please answer this comment The script which I have will process the input from an excel sheet (.xlsx) so how do I pass the excel sheet as input in the cmd, I tried ....(going to the path where the script and excel files are there) and I run this command.... (py script.py excel.xlsx).... But that doesn't work. Please tell me how to execute it in a proper way if you know
@wrttech422
@wrttech422 Год назад
you could take in the arguments as a list, and then use it (name of excel sheet) to process your excel sheet. use import sys, and sys.argv[1] will = excel.xlsx. Look at this website for further information. www.stackvidhya.com/run-python-file-in-terminal/#:~:text=You%20can%20use%20the%20command,while%20running%20the%20python%20script.
@wrttech422
@wrttech422 Год назад
I just made a video on command line arguments using python. See if this helps answer your question. Link to the video is below. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZQ9JO0e9468.html
@mohamedrajab8602
@mohamedrajab8602 2 года назад
I found much easier way With left click drag the file and drop it in the cmd and then press "Enter" and that's it
@abhigyanarth5031
@abhigyanarth5031 3 года назад
What is the process known as..?? ... redirection??
@myfuzzyanimals67
@myfuzzyanimals67 3 года назад
Stream redirection
@creativeshooter428
@creativeshooter428 3 года назад
Hey bro python program is running perfectly but how will i stop it plz tell me
@oliverf2924
@oliverf2924 3 года назад
like all programs with a sledgehammer
@creativeshooter428
@creativeshooter428 3 года назад
@@oliverf2924 wait what 😅😅
@oliverf2924
@oliverf2924 3 года назад
@@creativeshooter428 trust me, it will stop
@creativeshooter428
@creativeshooter428 3 года назад
@@oliverf2924 are telling me to destroy the computer with a sledgehammer😂🤔😑
@oliverf2924
@oliverf2924 3 года назад
@@creativeshooter428 yes, it is a life hack
@COLLIERB
@COLLIERB 6 месяцев назад
TabError: inconsistent use of tabs and spaces in indentation
@linaba4340
@linaba4340 2 года назад
When I write python it says that python was not found
@wrttech422
@wrttech422 2 года назад
you must have python installed. If you already do, check your environmental variables
@kerimca98
@kerimca98 2 года назад
My Python is nothing but a command prompt with nothing on the top wtf Edit: Nvm found the idle Python
@snafu9457
@snafu9457 3 года назад
i keep getting this: >>> python test.py File "", line 1 python test.py ^ SyntaxError: invalid syntax >>>
@wrttech422
@wrttech422 3 года назад
What does your code look like? Are you typing in the commands properly? Windows/Mac/Linux machine? Make sure youre not running python test.py from inside the interpreter, but instead from inside the command prompt.
@markersdoings
@markersdoings Год назад
I have some bug that I don't know how to fix. C:\Users\User\Desktop>python hell.py File "C:\Users\User\Desktop\hell.py", line 3 print(x**2) ^ IndentationError: expected an indented block after 'for' statement on line 2
@wrttech422
@wrttech422 Год назад
there is an error in ur code. Indentation error. You can pste it here and i can fix it for you if you want
@markersdoings
@markersdoings Год назад
@@wrttech422 well, I do exactly what he shows. Open the video and you'll see what my code looks like.
@wrttech422
@wrttech422 Год назад
@@markersdoings Your code is wrong. You have to fix it. Paste your python code here and ill fix it for you
@markersdoings
@markersdoings Год назад
@@wrttech422 I already know this by default. print ('hell world') For int (1,11): print(x**2) Type this in cmd and you won't make it .
@wrttech422
@wrttech422 Год назад
because that code is wrong. It should be: print ('hell world') for x in range(1,11): print(x**2) 1. F in for should not be capitalized 2. for int(1,11) should actually be: for x in range(1,11): 3. print(x**2) should be indented after the for loop
@davidbradford5767
@davidbradford5767 3 года назад
SyntaxError: invaild syntax >>> py test.py File "", line 1 py test.py ^ I have tried 5 different videos and reinstalled twice, and wrote 3 scripts. any help would be greatly appreciated.
@wrttech422
@wrttech422 3 года назад
if your python program "test" is located in a folder on your desktop called code...youll type: cd Desktop/code python test.py youre typing py test.py are you using mac or windows?
@wrttech422
@wrttech422 3 года назад
your environmental variables could also be incorrectly set "To check that Environment variable is set correctly: Open cmd.exe (command prompt/terminal) Type Python and press return (a) If it outputs the version of python then the environment variables are set correctly. (b) If it outputs "no such program or file name" then your environment variable are not set correctly." if you type python inside the command prompt and the version is displayed, youre probably trying to run the file inside the python interpreter.
@davidbradford5767
@davidbradford5767 3 года назад
@@wrttech422 I am using windows, that worked thank you so much!
@sujalshah86
@sujalshah86 3 года назад
Thanks a lot
@tempatempo3805
@tempatempo3805 2 года назад
Thank you
@eugenefrancisco1029
@eugenefrancisco1029 2 года назад
Thanks bro
Далее
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1 млн
ТИПИЧНАЯ БЕРЕМЕННАЯ ЖЕНЩИНА
01:00
would you eat this? #shorts
00:39
Просмотров 1,1 млн
How to do Python Scripting (run a python py file)
8:30
Run Python Scripts from the Terminal
5:36
Просмотров 213 тыс.
👩‍💻 Python for Beginners Tutorial
1:03:21
Просмотров 3 млн
Automate your job with Python
6:07
Просмотров 363 тыс.
Convert py to exe - from code to software
5:55
Просмотров 464 тыс.
60 Linux Commands you NEED to know (in 10 minutes)
10:50