Delay load some particularly heavy stdlib modules that are not often needed

This commit is contained in:
Kovid Goyal
2018-05-03 17:53:22 +05:30
parent 86686bfac7
commit de1a2f7682
5 changed files with 10 additions and 7 deletions

View File

@@ -4,7 +4,6 @@
import json
import re
import socket
import sys
import types
from functools import partial
@@ -41,6 +40,7 @@ will only work if this process is run within an existing kitty window.
def do_io(to, send, no_response):
import socket
send = ('@kitty-cmd' + json.dumps(send)).encode('ascii')
send = b'\x1bP' + send + b'\x1b\\'
if to: