• 大小: 95.38MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2022-12-07
  • 语言: 其他
  • 标签: cmder下载  cmder  full  

资源简介

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.xml
     目录           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.xml
     文件         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\clink\
     目录           0  2017-02-20 15:00  cmder\vendor\clink-completions\
     文件          16  2016-12-02 07:15  cmder\vendor\clink-completions\.cmderver
     文件          30  2016-11-07 04:54  cmder\vendor\clink-completions\.gitignore
............此处省略6420个文件信息

评论

共有 条评论