0

I am currently learning python programming with https://automatetheboringstuff.com/2e/appendixb/, which touches on how to run a script from outside of IDLE.

However, by following the instructions, typing in the path to my scripts: The path to my scripts: c:\users\XXXX XXX\hello1.py 1) in the terminal, it returns "c:\users XXXX is not recognized as an internal or external command, operable program or batch file."

2) typing in 'py' followed by the path to my scripts in the run dialog, ie wind + R, it returns "windows cannot find 'py'. Make sure you typed the name correctly, and then try again" And if I type the path without the 'py' it just opens the script file which is not what I want.

3) in the teaching materials, the instructor uses 'tab completion' in cmd, but when i press tab it just input a tab space. I did some desktop research, and tried changing the "completionchar" to "9" in the "registry editor" hoping to enable the auto completion, but it still doesn't help.

I am a beginner and I hope my question is not unreasonable. Please help, my respected python gods.

Alex

Terry Jan Reedy
  • 18,414
  • 3
  • 40
  • 52
AlexH2
  • 1
  • Hi, I understand you are using Windows OS. Try this to run python script from Windows cmd: https://stackoverflow.com/questions/4235834/how-to-make-python-scripts-executable-on-windows – Rahul K Apr 23 '20 at 08:40
  • I think its already answered here : https://stackoverflow.com/questions/32742093/how-to-access-python-from-command-line-using-py-instead-of-python – Abhishek Prusty Apr 23 '20 at 18:06
  • Your first problem appears to be the space in the directory name. Enclosing the complete path in double quotes, `"some path"` might solve that. It does for arguments. As to 3, tab completion in Command Prompt would be new to me. – Terry Jan Reedy May 12 '20 at 04:45

0 Answers0