Pass Variables to a Python Script from the Command Line (or terminal, or shell)

preview_player
Показать описание
Pass variables to a Python script from the command line (terminal, shell, etc.).
Рекомендации по теме
Комментарии
Автор

wow i've been searching this for a week trying to figure how to do it ... and yeah thank you, idk that was so simple! keep it up!

andromedanian
Автор

This is the perfect answer for what I was asked by a coworker. Thanks!

smellslikemaurice
Автор

You sound like the guy from everybody loves Raymond 😄. Thank you again.

melvw
Автор

This really helped me a lot. Thank you!

aartigehani
Автор

Great and super-helpful tutorial. Thanks.

PhilaniBiyela
Автор

this is great tutorial, could you let me know how you pass more than 1 argument while scheduling the script via windows task?

brijendraydv
Автор

how to pass a variable in Python just like & in linux?

cosmicwolf
Автор

Great! I have been searching for a solution to passing variables easily into a different scipt for months! This solves my problem and will vastly improve my programming. This knowledge and this command:
os.system('python scriptpass.py "Person Name is " "Daffy " "Duck " 3.5 " years old" "Record #" 493 ')
All of my problems are solved.
Thank you so much!!!

halestone
Автор

I have an window application. I need to send username and password to the particular textbox.. Can you please help me how to do it. I am able to

window1.set_focus()
window1.maximize()


do the above. but after this
window1['User Name'].type_keys("") i need to send like this.. i am not able to work on it ..Please help

nellaimuthuvels
Автор

Is it possible to prompt the user before they enter an input?

Nakura-djmg
Автор

why don't we just use input()
why is this useful

oximas-oevf