나는 파이썬 2를 배우려고 노력 중이며 컴퓨터 언어에 배경이 없다. 자습서 "ByeofPython"을 사용 중이다. 연습은 편집자 (텍스트 wrangler)이 구문 오류에 대한 이유를 모르겠다
에#!/usr/bin/python
#Filename : helloworld.py
print "Hello World'
을 입력하고 우리에게 helloworld.py로 저장하도록 요청합니다. 나는 이것을하고 파이썬 훈련이라는 폴더에 내 바탕 화면에 저장했습니다.
자습서는 다음에 우리를 묻는다 : 내가 잘못 어디로 갔는지 나는이
python helloworld.py
^
SyntaxError: invalid syntax
누군가가 말해 줄래 얻을 터미널로 이동 파이썬 helloworld.py를 입력 할 때
Run this program by opening a shell (Linux terminal or DOS prompt) and entering the command python helloworld.py. If you are using IDLE, use the menu Edit -> Run Script or the keyboard shortcut Ctrl-F5. The output is as shown below.
$ python helloworld.py Hello World
? 나는 모든 것을 정확하게 입력했다고 느낍니다. Mac을 사용하고 Python 2.6을 실행 중입니다.
혹시 이걸 파이썬 인터프리터에 입력 했습니까? –