求助,关于python的command not found问题
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Simple Gopher Client with file-like interface - Chapter 1
# gopherclient3.py
import socket,sys
port = 70
host = sys.argv[1]
filename = sys.argv[2]
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect((host,port))
# 程序需要既读又写,关闭缓存模式
fd = s.makefile('rw',0)
fd.write(filename + "\r\n")
for line in fd.readlines():
sys.stdout.write(line)
以上为源代码,运行时输入sudo ./gopherclient3.py quux.org /,提示”command not found",但是同一目录下的其他python文件可以正常运行。