• 大小: 80.69MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2022-06-26
  • 语言: 其他
  • 标签: cmder  full  1.3.1  

资源简介

cmderFull 1.3.1,在公司下载好长时间,完整版的啦,共有80.6M

资源截图

代码片段和文件信息

#!/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  2016-08-19 09:27  bin\
     文件        3502  2016-08-19 09:27  bin\alias.bat
     文件          84  2016-08-19 09:27  bin\Readme.md
     文件       65799  2016-08-19 09:27  CHANGELOG.md
     文件      129536  2016-08-19 09:27  Cmder.exe
     目录           0  2016-08-19 09:27  config\
     文件       52973  2016-08-19 09:27  config\ConEmu.xml
     文件         799  2016-08-19 09:27  config\Readme.md
     文件        1784  2016-08-19 09:27  CONTRIBUTING.md
     目录           0  2016-08-19 09:27  icons\
     文件       18089  2016-08-19 09:27  icons\cmder.ico
     文件        5272  2016-08-19 09:27  icons\cmder_blue.ico
     文件        5193  2016-08-19 09:27  icons\cmder_green.ico
     文件        5383  2016-08-19 09:27  icons\cmder_orange.ico
     文件        5317  2016-08-19 09:27  icons\cmder_purple.ico
     文件        4898  2016-08-19 09:27  icons\cmder_red.ico
     文件        5227  2016-08-19 09:27  icons\cmder_yellow.ico
     文件       10035  2016-08-19 09:27  README.md
     目录           0  2016-08-19 09:27  vendor\
     目录           0  2016-08-19 09:27  vendor\clink\
     目录           0  2016-08-19 09:27  vendor\clink-completions\
     文件          16  2016-08-19 09:27  vendor\clink-completions\.cmderver
     文件          30  2016-06-11 06:00  vendor\clink-completions\.gitignore
     文件         195  2016-06-11 06:00  vendor\clink-completions\.init.lua
     文件        4849  2016-06-11 06:00  vendor\clink-completions\chocolatey.lua
     文件        2946  2016-06-11 06:00  vendor\clink-completions\coho.lua
     文件        3022  2016-06-11 06:00  vendor\clink-completions\cordova.lua
     文件       27397  2016-06-11 06:00  vendor\clink-completions\git.lua
     文件        1083  2016-06-11 06:00  vendor\clink-completions\LICENSE
     目录           0  2016-06-11 06:00  vendor\clink-completions\modules\
     文件         591  2016-06-11 06:00  vendor\clink-completions\modules\color.lua
............此处省略6077个文件信息

评论

共有 条评论