资源简介
cmder是一个增强型命令行工具,比window系统自带的cmd更加强大,不仅可以使用windows下的所有命令,更爽的是可以使用linux的命令,shell命令,完整版的还集成了git,大大的简化了开发,该软件是免费的,无需安装直接解压后就可以使用
代码片段和文件信息
#!/usr/bin/python
#
# Server that will accept connections from a Vim channel.
# Run this server and then in Vim you can open the channel:
# :let handle = ch_open(‘localhost:8765‘)
#
# Then Vim can send requests to the server:
# :let response = ch_sendexpr(handle ‘hello!‘)
#
# And you can control Vim by typing a JSON message here e.g.:
# [“ex““echo ‘hi there‘“]
#
# There is no prompt just type a line and press Enter.
# To exit cleanly type “quit“.
#
# See “:help channel-demo“ in Vim.
#
# This requires Python 2.6 or later.
from __future__ import print_function
import json
import socket
import sys
import threading
try:
# Python 3
import socketserver
except ImportError:
# Python 2
import SocketServer as socketserver
thesocket = None
class ThreadedTCPRequestHandler(socketserver.baseRequestHandler):
def handle(self):
print(“=== socket opened ===“)
global thesocket
thesocket = self.request
while True:
try:
data = self.request.recv(4096).decode(‘utf-8‘)
except socket.error:
print(“=== socket error ===“)
break
except IOError:
print(“=== socket closed ===“)
break
if data == ‘‘:
print(“=== socket closed ===“)
break
print(“received: {0}“.format(data))
try:
decoded = json.loads(data)
except ValueError:
print(“json decoding failed“)
decoded = [-1 ‘‘]
# Send a response if the sequence number is positive.
# Negative numbers are used for “eval“ responses.
if decoded[0] >= 0:
if decoded[1] == ‘hello!‘:
response = “got it“
else:
response = “what?“
encoded = json.dumps([decoded[0] response])
print(“sending {0}“.format(encoded))
self.request.sendall(encoded.encode(‘utf-8‘))
thesocket = None
class ThreadedTCPServer(socketserver.ThreadingMixIn socketserver.TCPServer):
pass
if __name__ == “__main__“:
HOST PORT = “localhost“ 8765
server = ThreadedTCPServer((HOST PORT) ThreadedTCPRequestHandler)
ip port = server.server_address
# Start a thread with the server -- that thread will then start one
# more thread for each request
server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
server_thread.daemon = True
server_thread.start()
print(“Server loop running in thread: “ server_thread.name)
print(“Listening on port {0}“.format(PORT))
while True:
typed = sys.stdin.readline()
if “quit“ in typed:
print(“Goodbye!“)
break
if thesocket is None:
print(“No socket yet“)
else:
print(“sending {0}“.format(type
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-02-07 19:37 cmder\
目录 0 2017-02-20 15:00 cmder\bin\
文件 3502 2016-12-02 07:14 cmder\bin\alias.bat
文件 84 2016-12-02 07:14 cmder\bin\Readme.md
文件 73491 2016-12-02 07:14 cmder\CHANGELOG.md
文件 130560 2016-12-02 07:15 cmder\Cmder.exe
目录 0 2017-08-21 15:52 cmder\config\
文件 29825 2020-03-19 11:13 cmder\config\.history
文件 52973 2016-12-02 07:14 cmder\config\ConEmu.xm
目录 0 2018-01-01 14:57 cmder\config\profile.d\
文件 796 2016-12-02 07:14 cmder\config\Readme.md
文件 4131 2017-08-11 14:27 cmder\config\settings
文件 471 2017-11-10 13:50 cmder\config\user-aliases.cmd
文件 54575 2020-03-19 02:16 cmder\config\user-ConEmu.xm
文件 225 2017-08-11 14:27 cmder\config\user-profile.cmd
文件 172 2017-08-21 15:52 cmder\config\user-profile.sh
文件 1784 2016-12-02 07:14 cmder\CONTRIBUTING.md
目录 0 2017-02-20 15:00 cmder\icons\
文件 18089 2016-12-02 07:14 cmder\icons\cmder.ico
文件 5272 2016-12-02 07:14 cmder\icons\cmder_blue.ico
文件 5193 2016-12-02 07:14 cmder\icons\cmder_green.ico
文件 5383 2016-12-02 07:14 cmder\icons\cmder_orange.ico
文件 5317 2016-12-02 07:14 cmder\icons\cmder_purple.ico
文件 4898 2016-12-02 07:14 cmder\icons\cmder_red.ico
文件 5227 2016-12-02 07:14 cmder\icons\cmder_yellow.ico
文件 10039 2016-12-02 07:14 cmder\README.md
目录 0 2017-02-20 15:01 cmder\vendor\
目录 0 2017-02-20 15:01 cmder\vendor\cli
目录 0 2017-02-20 15:00 cmder\vendor\cli
文件 16 2016-12-02 07:15 cmder\vendor\cli
文件 30 2016-11-07 04:54 cmder\vendor\cli
............此处省略6420个文件信息
- 上一篇:2019全国行政区划矢量图
- 下一篇:清除越狱环境工具
相关资源
- EhLib v6.0 Full Source.rar
- Three-dimensional fullereneyne-like polymers
- Strichartz estimates for the wave equation wit
- The Existence of Optimal Control for Fully Cou
- AlphaControls14.23_20190502_Full_Source.rar
- Seismic Frequency-domain Full waveform 2-D inv
- 01_BeautifulLogin.zip
- cmder min安装包
- TeeChart Pro v7 VCL CLX Full
- DNP_V3.0_protocol_full.pdf
- llPDFLib 6.4.0.138 FULL CODE 可以输出中文
-
Remob
jects Hydra for Delphi V3.0.39.777 ful - Fullstack Vue The Complete Guide to Vue.js 源码
- RealThinClient SDK 9.5 Full Source
- Teleport_Ultra_1.65_full_SC.rar
- dotNetFx45LP_Full_x86_x64zh-Hans.exe
- FlexGraphics_Full_1.8.zip
- FastReport v6.3.11 Enterprise Full Source
- Improved RTM Depth Image with Full Waveform In
- FastReport Professtional 5.6.2 Full Source for
- FullCalendar 2.9 排课课节,拖拽
- CH7033B Full Datasheet Rev1.32.pdf.7z
- zw_Mark_Man_Full_Cracked.zip
- ImageEn 5.2.0 D5 to Berlin Full Source
- cximage600_full在VS2013编译的库
- HttpAnalyzerFull_V7 (包含激活码,亲测支
- StardockFences3.0.3(FULL+Patch).zip
- 字模生成软件Zimo3InstallFULL液晶字模制
- dOPC for D6 ~ XE4 DXE10.2 Tokyo DXE10.3 RIO Fu
- XLSReadWriteII 6.00.47 For Delphi10.3 RIO Full
评论
共有 条评论