求助,关于python的command not found问题

cysolo cysolo 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
#! /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文件可以正常运行。
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
cysolo
脚本语言 37,737 成员 34,208 内容