run python script from cmd with inputs -
i have written these lines of code input user:
uname=os.environ.get( "username" ) pwd = getpass.getpass() path=input("provide textfile input: " ) i want execute pythonapplication1.py cmd. please guide me.i using python 3.6.
i think want run program windows command line, need add python system path variable or change directory python's directory.
type python in cmd , press enter, if python comes up, path ok! can run program this:
python your_program_path/application1.py else if python wasn't in path, can add it: computer -> system properties -> advanced system settings -> environment variables or can change working directory python's directory:
cd c:\python_path and then:
python your_program_path/application1.py
Comments
Post a Comment