raczben / wexpect Goto Github PK
View Code? Open in Web Editor NEWWindows variant of pexpect.
License: MIT License
Windows variant of pexpect.
License: MIT License
On Windows 10, after calling spawn, nothing is received from spawned process except EOF
.
Problem occurs from either a script or from shell commands.
To Reproduce enter in shell
import wexpect
child = wexpect.spawn('cmd.exe')
print(child)
_<wexpect.host.SpawnPipe object at 0x00ED83E8>
command: C:\WINDOWS\system32\cmd.exe
args: ['C:\\WINDOWS\\system32\\cmd.exe']
searcher: None
buffer (last 100 chars):
before (last 100 chars): None
after: None
match: None
match_index: None
exitstatus: None
flag_eof: False
host_pid: 17168
child_fd: None
closed: False
timeout: 30
delimiter: <class 'wexpect.wexpect_util.EOF'>
maxread: 60000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.1
delayafterterminate: 2_
str = child.readline()
print(str)
child.expect('>')
_Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
child.expect('>')
File "C:\Users\jweber\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wexpect\host.py", line 732, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "C:\Users\jweber\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wexpect\host.py", line 745, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "C:\Users\jweber\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wexpect\host.py", line 806, in expect_loop
raise EOF('EOF flag has been raised.')
wexpect.wexpect_util.EOF: EOF flag has been raised._
Environment:
Describe the bug
If a Windows Python program calls 'spawn' or 'run' too many times (with WEXPECT_SPAWN_CLASS=SpawnPipe), the program halts with an error on the console that says 'the environment variable is longer than 32767 characters'.
To Reproduce
Steps to reproduce the behavior are as follows.
(1) Save the code below in a file called run_check.py
(2) Bring wexpect into the Python environment (pip install wexpect)
(3) Set the WEXPECT_SPAWN_CLASS environment variable (set WEXPECT_SPAWN_CLASS=SpawnPipe)
(4) Run the code using "python run_check.py"
(5) Wait for the program to end or fail. This will likely take a few minutes, so the code includes a simple progress indicator that lets you know it is still running.
import wexpect
def main():
print('---- run_check.py ----')
for loop in range(1, 1000):
try:
x = wexpect.run('tasklist')
except Exception as error:
print('\n---- Unable to run command ----')
print('loop =', loop, '\nerror =', error)
exit(1)
print('.', sep='', end='', flush=True) # Progress indicator
if __name__ == "__main__":
main()
else:
pass
Expected behavior
The program should print 1,000 dot characters and then stop if the issue does not occur. If the program encounters the issue, it will print the loop number and the error.
Screenshots
None. The code provided above should demonstrate the issue.
Environment:
Additional context
When I run the program with the environment variable WEXPECT_SPAWN_CLASS not set (legacy wexpect), it completes without any error. (I can't use wexpect this way because I need to be able to catch Control-C, and that means I need to set WEXPECT_SPAWN_CLASS=SpawnPipe.)
When I run the program with WEXPECT_SPAWN_CLASS=SpawnPipe, it fails after calling 'run' roughly 650 times, and the error says: "the environment variable is longer than 32767 characters".
I've seen these same results on two different Windows systems. On one system, 'loop' reaches 656 before the program fails, and on the other system 'loop' reaches 643 before the failure occurs.
Note: The program given above only calls 'run', but I've gotten exactly the same results with a longer program that uses 'spawn'/'terminate' instead of 'run'. (I thought it would be better to use the shorter program for this Issue. :-)
I'm guessing, but it's like there's an environment variable that grows by ~50 bytes every time 'run' or 'spawn' is called, and when the environment variable becomes larger than 2^15, the program stops with an error.
somewhere during processing, I think around about 20000 lines of child output (hard to tell since I have expect-loop print statements interleaved in with my child output logfile), I'm getting a freeze in processing. Basically I'm running the same set of commands and expectations, but in different Python virtualenvs which the spawned shell is starting. So the same set of commands works in about 8 environments, and then freezes in the 9th. The specific command running when it gets stuck is a pip install --editable git+https://gitlab.devserver.myhost.com/my_project/my_package.git#egg=my_package
.
I'm not sure if it's related, but I see this output a lot beforehand:
Running command git fetch -q --tags
bash: /dev/tty: No such device or address
install_pip_package expectation I==6 (child is asking for username)
error: failed to execute prompt script (exit code 1)
my_username
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
stty: 'standard input': Inappropriate ioctl for device
where install_pip_package expectation
is printed from my expect loop, showing the expectation list index, and my_username
is the sendline
response to the child.
So I'm wondering if I'm hitting some output buffer limit, etc...
Describe the bug
after or while running certain commands, the child
object dies with this error... in this case, an expect
had just finished, and I was about to run another sendline
but it was hanging... when I tried debugging with import pdb; pdb.set_trace()
and then printing the c.before
I got the crash too:
(Pdb) c.before
Traceback (most recent call last):
File "C:\Users\myusername\git\test\wexpect.py", line 2304, in read_nonblocking
s = self.readConsoleToCursor()
File "C:\Users\myusername\git\test\wexpect.py", line 2234, in readConsoleToCursor
raw = self.readConsole(self.__currentReadCo, cursorPos)
File "C:\Users\myusername\git\test\wexpect.py", line 2177, in readConsole
s = self.__consout.ReadConsoleOutputCharacter(readlen, startCo)
TypeError: integer argument expected, got float
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\myusername\git\test\wexpect.py", line 1433, in expect_loop
c = self.read_nonblocking(self.maxread, timeout)
File "C:\Users\myusername\git\test\wexpect.py", line 1776, in read_nonblocking
s = self.wtty.read_nonblocking(timeout, size)
File "C:\Users\myusername\git\test\wexpect.py", line 2325, in read_nonblocking
raise EOF('End Of File (EOF) in Wtty.read_nonblocking().')
wexpect.EOF: End Of File (EOF) in Wtty.read_nonblocking().
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "dflauncher.py", line 197, in <module>
automate_script()
File "dflauncher.py", line 155, in automate_script
c.sendline('some_command')
File "C:\Users\myusername\git\test\wexpect.py", line 1366, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "C:\Users\myusername\git\test\wexpect.py", line 1380, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "C:\Users\myusername\git\test\wexpect.py", line 1451, in expect_loop
raise EOF (str(e) + '\n' + str(self))
wexpect.EOF: End Of File (EOF) in Wtty.read_nonblocking().
<wexpect.spawn_windows object at 0x000002328FA14908>
version: 0.0.1.unkown0 ($Revision: 399 $)
command: C:\windows\system32\cmd.exe
args: ['C:\\windows\\system32\\cmd.exe']
searcher: searcher_re:
0: re.compile("123123expect123123")
buffer (last 100 chars):
before (last 100 chars): yes
after: <class 'wexpect.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 12760
child_fd: None
closed: False
timeout: 30
delimiter: <class 'wexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
To Reproduce
lots of long-running commands where I have to watch for timeout and continue
c.sendline('some_command_that_might_do_svn_checkout repo_URL')
expect_msg = [TIMEOUT, 'Press ENTER to continue', 'Run SVN Update\?\(\[yes\]/no\)']
i=0
while i!=3:
i = c.expect(expect_msg)
print('expect I is : {}'.format(i))
if i == 1:
c.sendline('')
elif i == 2:
c.sendline(' yes') #note the leading space is required!!!
expect_msg.append(unique_prompt)
Expected behavior
doesn't crash
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
__version__ = '0.0.1.unkown0'
__revision__ = '$Revision: 399 $'
Here's the setup
from __future__ import unicode_literals
import os
import sys
import time
import json
import shutil
import getpass
import argparse
import subprocess
from ast import literal_eval
from datetime import datetime
import collections
import re
os.environ['WEXPECT_SPAWN_CLASS'] = 'SpawnSocket'
from wexpect import spawn
from wexpect import TIMEOUT, EOF
class stream_splitter(object):
def __init__(self):
self.log = open('debug_log.log', 'wb')
self.last_string_buffer = collections.deque(maxlen=2)
def multiple_wheel_building_lines(self, string):
self.last_string_buffer.append(string.strip())
if all([s.startswith('Building wheel for') for s in self.last_string_buffer]):
return True
return False
def force_decode(self, string, codecs=['cp1252', 'utf8', 'utf-8']):
if isinstance(string, str):
return string.encode('utf8')
for i in codecs:
try:
return string.decode(i, errors='replace').encode('utf8')
except UnicodeDecodeError:
pass
def write(self, val):
if not val:
return
val = self.force_decode(val)
string_val = val.decode('utf8')
if self.multiple_wheel_building_lines(string_val):
return
print(string_val)
self.log.write(val)
def read(self):
pass
def flush(self):
self.log.flush()
DEBUG=True
if DEBUG:
log = stream_splitter()
# later on in the file
shell = spawn('cmd.exe')
time.sleep(1)
shell.sendline('PROMPT {}'.format(unique_prompt))
shell.expect(unique_prompt)
print('*** got cmd prompt')
if DEBUG:
shell.logfile_read = log
# do more work, running pip installs in the spawned shell, running git clone, running Python based unit-tests of my packages
and here's the error:
File "my_script.py", line 453, in start_automation
shell = spawn('cmd.exe')
File "C:\misc\my_script_dir\wexpect\host.py", line 1030, in __init__
interact=interact)
File "C:\misc\my_script_dir\wexpect\host.py", line 305, in __init__
self.connect_to_child()
File "C:\misc\my_script_dir\wexpect\host.py", line 1047, in connect_to_child
self.sock.connect((self.host, self.port))
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
Traceback (most recent call last):
File "C:\misc\my_script_dir\wexpect\host.py", line 314, in __del__
self.terminate()
File "C:\misc\my_script_dir\wexpect\host.py", line 453, in terminate
self.kill()
File "C:\misc\my_script_dir\wexpect\host.py", line 1096, in kill
self.send(SIGNAL_CHARS[sig])
File "C:\misc\my_script_dir\wexpect\host.py", line 624, in send
return self._send_impl(s)
File "C:\misc\my_script_dir\wexpect\host.py", line 1042, in _send_impl
self.sock.sendall(s)
OSError: [WinError 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
If I change the ENV var to os.environ['WEXPECT_SPAWN_CLASS'] = 'SpawnPipe'
then my logging from the spawned shell doesn't print with the previously working code in the "old" method (using the stream_splitter
"object with a write
method").
Describe the bug
When run in cmd window, the spawn command works fine, but if in a virtual environment, it hangs forever.
To Reproduce
This works
C:\Users\csullivan\Documents\Projects\netlog>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from wexpect import spawn
>>> spawn("cmd.exe")
<wexpect.host.SpawnPipe object at 0x0000019F7040DBB0>
>>>
but this does not return from spawn.
(env) C:\Users\csullivan\Documents\Projects\netlog>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from wexpect import spawn
>>> spawn("cmd.exe")
Expected behavior
I would expect identical behaviour in a Python Virtual Environment if software versions are the same, which they are.
Environment:
Microsoft Windows 10 Pro 10.0.19043 Build 19043
Dell Latitude 7490
Python 3.9.5
wexpect 4.0.0
Additional context
Submitted this as a question to Stack Overflow.
Describe the bug
"Greed tests" fails
To Reproduce
import wexpect
p = wexpect.spawn('python list100.py', maxread=1)
assert p.expect(['1, 2, 3', '2,']), 1
The list100.py
can be found in tests
directory.
Expected behavior
To pass the assertion.
Environment:
In version 224 of pywin32, the function TerminateProcess()
is no longer located in
win32api.win32process
TerminateProcess()
is now located under win32api
and called like win32api.TerminateProcess()
Issue: wexpect cannot wait on EOF
properly. The before
field wont contain the program's output if it has no prompt.
Reproduce:
import wexpect
import time
p = wexpect.spawn('uname')
time.sleep(1)
p.expect(wexpect.EOF)
p.before
Describe the bug
setecho()
has no effect at all.
To Reproduce
import wexpect
import time
import os
print(wexpect.__version__)
def test_setecho():
# Path of cmd executable:
cmdPath = 'cmd'
cmdPrompt = '>'
referenceOut = None
# Start the child process
p = wexpect.spawn(cmdPath)
p.expect(cmdPrompt)
p.setecho(0) # SETECHO
p.interact()
for c in 'echo Hello':
p.send(c)
time.sleep(0.2)
p.send(os.linesep)
time.sleep(2)
p.stop_interact()
p.sendline('exit')
# Start the child process
p = wexpect.spawn(cmdPath)
p.expect(cmdPrompt)
p.setecho(1) # SETECHO
p.interact()
for c in 'echo Hello':
p.send(c)
time.sleep(0.2)
p.send(os.linesep)
time.sleep(2)
p.stop_interact()
p.sendline('exit')
test_setecho()
Expected behavior
The console should echo the sent characters in setecho(1)
case.
Environment:
Describe the bug
spawn_windows::sendintr() calls Wtty::sendintr(), while it doesn't implemented.
I am trying to automate ssh terminal operations. Currently facing couple of issues
Description
Logger prints into child's console (while it should print only into file), in the following case:
To Reproduce
import wexpect
import time
def switch_back_error ():
p2 = wexpect.spawn('echo blabla')
# This is an essential wait:
time.sleep(1)
p2.expect(wexpect.EOF)
# Path of cmd executable:
cmd_exe = 'cmd'
cmdPrompt = '>'
# Start the child process
p = wexpect.spawn(cmd_exe)
# Wait for prompt
p.expect(cmdPrompt)
# Send a command
p.sendline('echo hello')
p.expect(cmdPrompt)
p.interact()
time.sleep(2)
if 'hello' != p.before.splitlines()[1]:
raise Exception("'hello' != p.before.splitlines()[1]")
if __name__ == '__main__':
switch_back_error()
Expected behavior
Script above should not raise any exception.
Environment:
Additional context
Add logging statement between switchTo()
and switchBack()
The Pexpect library supports passing an async_
argument that runs the command in async mode, compatible with asyncio. This seems like a great option for an expect type system as it inherently has a lot of waiting. Would it be possible to implement this?
Describe the bug
The logger writes everything twice into the logfile.
Snippet:
2020-02-23 00:00:46,657 - __main__.py:39 - INFO - Starter arguments: Namespace(buffer_size_x=80, buffer_size_y=16000, codepage=None, command=['C:\\Program Files\\Git\\usr\\bin\\cat.EXE'], console_reader_class='ConsoleReaderPipe', host_pid=19440, interact='False', local_echo='True', window_size_x=80, window_size_y=25)
2020-02-23 00:00:46,657 - __main__.py:39 - INFO - Starter arguments: Namespace(buffer_size_x=80, buffer_size_y=16000, codepage=None, command=['C:\\Program Files\\Git\\usr\\bin\\cat.EXE'], console_reader_class='ConsoleReaderPipe', host_pid=19440, interact='False', local_echo='True', window_size_x=80, window_size_y=25)
2020-02-23 00:00:46,657 - console_reader.py:110 - INFO - ConsoleReader started. location D:\betonra\wexpect-tox\dist\wexpect\wexpect\console_reader.pyc
2020-02-23 00:00:46,657 - console_reader.py:110 - INFO - ConsoleReader started. location D:\betonra\wexpect-tox\dist\wexpect\wexpect\console_reader.pyc
2020-02-23 00:00:46,657 - console_reader.py:116 - INFO - Setting console output code page to 1250
2020-02-23 00:00:46,657 - console_reader.py:116 - INFO - Setting console output code page to 1250
2020-02-23 00:00:46,657 - console_reader.py:119 - INFO - Console output code page: 1250
2020-02-23 00:00:46,657 - console_reader.py:119 - INFO - Console output code page: 1250
To Reproduce
Switch on logger with set WEXPECT_LOGGER_LEVEL=INFO
and run anything.
Expected behavior
Write each log-item once.
Environment:
Is your feature request related to a problem?
Pexect has use_poll
argument. Should be implemented in wexpect.
Problem/Request
The feature request I want to make is due to a problem I get, when I use wexpect.spawn and give this method the prepared environment variables with the env option. I would expect that spawn will use the PATH variable which is passed as env to it. (I'm using wexpect 3.3.0 with Python 3.6.5)
env = os.environ.copy()
env['PATH'] += f';{os.path.dirname(self.pcfg.vivado_config.vivado)}'
os.environ['WEXPECT_SPAWN_CLASS'] = 'SpawnPipe'
from wexpect import spawn
self.proc = spawn(command=cmd, cwd=self.cwd, env=env)
Unfortunately it just ignores it, when it comes to the shutil.which() routine, e.g. inside the host.py.
I would like to have that the spawn method is evaluating the environment's PATH value instead only using the PATH from system variables.
So the shutil.which command should be extended with the path argument from self.env if it is set.
if self.env:
command_with_path = shutil.which(self.command, path=self.env['PATH'])
else:
command_with_path = shutil.which(self.command)
Benefits
If you pass the env to the spawn method, you don't have to manipulate the PATH variable. Otherwise I have to manipulate the path variable which could lead to other problems.
This would be a clean solution.
Some unwanted data is appended the beginning of the before
field.
Run the hello_wexpect examlpe
python examples\hello_wexpect.py
D:\bt\wexpect
yINPUT_RECORD(EventType=1) (KEY_EVENT), PyINPUT_RECORD(EventType=1) (KEY_EVENT)]
{'Size': PyCOORDType(X=80,Y=16000), 'CursorPosition': PyCOORDType(X=14,Y=3), 'Attributes': 7, 'Window': PySMALL_RECTType(Left=0,Top=0,Right=79,Bottom=24), 'MaximumWindowSize': PyCOORDType(X=80,Y=64)}
lsPyINPUT_RECORD(EventType=1) (KEY_EVENT)]
{'Size': PyCOORDType(X=80,Y=16000), 'CursorPosition': PyCOORDType(X=2,Y=8), 'Attributes': 7, 'Window': PySMALL_RECTType(Left=0,Top=0,Right=79,Bottom=24), 'MaximumWindowSize': PyCOORDType(X=80,Y=64)}
__pycache__ coverage.xml LICENSE setup.cfgwexpect.egg-info
AUTHORS examples README.md setup.pywexpect.py
ChangeLog htmlcov requirements.txt testswexpect.pyc
D:\bt\wexpect
The following is unwanted
yINPUT_RECORD(EventType=1) (KEY_EVENT), PyINPUT_RECORD(EventType=1) (KEY_EVENT)]
{'Size': PyCOORDType(X=80,Y=16000), 'CursorPosition': PyCOORDType(X=14,Y=3), 'Attributes': 7, 'Window': PySMALL_RECTType(Left=0,Top=0,Right=79,Bottom=24), 'MaximumWindowSize': PyCOORDType(X=80,Y=64)}
lsPyINPUT_RECORD(EventType=1) (KEY_EVENT)]
{'Size': PyCOORDType(X=80,Y=16000), 'CursorPosition': PyCOORDType(X=2,Y=8), 'Attributes': 7, 'Window': PySMALL_RECTType(Left=0,Top=0,Right=79,Bottom=24), 'MaximumWindowSize': PyCOORDType(X=80,Y=64)}
Sendline fails in cygwin
To Reproduce
Cygwin console:
PC /cygdrive/d/wexpect
$ python examples/cmd_wrapper.py
Microsoft Windows [Version 10.0.18362.356]
(c) 2019 Microsoft Corporation. All rights reserved.
D:\wexpect>ls
Traceback (most recent call last):
File "examples/cmd_wrapper.py", line 34, in <module>
p.sendline(command)
File "D:\wexpect\wexpect.py", line 761, in sendline
n = self.send(s)
File "D:\wexpect\wexpect.py", line 1447, in send
c = self.wtty.write(s)
File "D:\wexpect\wexpect.py", line 1775, in write
wrote = self.__consin.WriteConsoleInput(records)
pywintypes.error: (6, 'WriteConsoleInput', 'The handle is invalid.')
Expected behavior
Not to crash
Environment:
Describe the bug
The problem I am facing is that whenever I convert my app using PyInstaller to an EXE. I get the following error.
Traceback (most recent call last):
File "site-packages\wexpect.py", line 307, in spawn
File "site-packages\wexpect.py", line 1648, in __init__
File "site-packages\wexpect.py", line 480, in __init__
File "site-packages\wexpect.py", line 1709, in _spawn
File "site-packages\wexpect.py", line 1939, in spawn
File "site-packages\wexpect.py", line 2028, in startChild
pywintypes.error (2, 'CreateProcess', "The system cannot find the file specified.')
To Reproduce
Steps to reproduce the behavior:
1- Create a new script.
2- Import wexpect.
3- Spawn cmd or any application in that script.
4- from the command line run "pyinstaller scriptname.py" to convert it to exe.
5- Finally, run the executable.
Expected behavior
Spawn should run without errors.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Additional context
I understand that the problem here is with the variable 'commandLine'. I noticed in the code that it already check for py2exe frozen attribute.
All the best,
A
Pexect has echo argument. Should be implemented in wexpect.
Can't work with windows's ssh client
I see several functions in the source code, but the documentation/README nor examples show what is the proper way to terminate a shell and all it's subprocesses.
Please add this to the main README, etc...
Describe the bug
I make a test on win10, try to send a few commands and get their feedback printing.
code like this
import wexpect
import re
cmdPrompt = re.compile('[A-Z]\:.+>')
p = wexpect.spawn('cmd.exe')
p.expect(cmdPrompt, timeout = 50)
p.sendline('VER')
p.expect(cmdPrompt, timeout = 50)
print('========1 VER')
print(p.before)
print(p.after)
p.sendline('VOL')
p.expect(cmdPrompt, timeout = 50)
print('========2 VOL')
print(p.before)
print(p.after)
p.sendline('ECHO 1')
p.expect(cmdPrompt, timeout = 50)
print('========3 ECHO 1')
print(p.before)
print(p.after)
To Reproduce
run this script on win10
Expected behavior
every step send the command, I can get the matching feedback printing
Screenshots
Now seems the feedback printing is always to be showing later
The execution results are as follows
D:\CODE>python test.py
========1 VER
D:\CODE>
========2 VOL
VER
Microsoft Windows [Version 10.0.18363.1110]
D:\CODE>
========3 ECHO 1
D:\CODE>
D:\CODE>
Environment:
Describe the bug
I cannot call wexpect.spawn
because I always get a timeout error.
To Reproduce
>>> wexpect.spawn('cmd', timeout=10)
Traceback (most recent call last):
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 256, in __del__
self.terminate()
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 416, in terminate
self.kill()
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 446, in kill
self.send(SIGNAL_CHARS[sig])
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 600, in send
return self._send_impl(s)
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 977, in _send_impl
win32file.WriteFile(self.pipe, s)
pywintypes.error: (6, 'WriteFile', 'Controlador no válido.')
Exception ignored in: <function SpawnBase.__del__ at 0x000001F77D5E89D0>
Traceback (most recent call last):
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 256, in __del__
self.terminate()
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 416, in terminate
self.kill()
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 446, in kill
self.send(SIGNAL_CHARS[sig])
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 600, in send
return self._send_impl(s)
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 977, in _send_impl
win32file.WriteFile(self.pipe, s)
pywintypes.error: (6, 'WriteFile', 'Controlador no válido.')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 875, in __init__
super().__init__(
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 247, in __init__
self.connect_to_child()
File "c:\users\user\source\repos\copier\copier\.venv\src\wexpect\wexpect\host.py", line 897, in connect_to_child
raise TIMEOUT('Connect to child has been timed out.')
wexpect.wexpect_util.TIMEOUT: Connect to child has been timed out.
Expected behavior
It should spawn the process and let me do stuff 😅
Screenshots
Environment:
Additional context
I'm mainly trying to spawn a python CLI app that runs in a Poetry venv. I guess I could hit #22 or #26, but this one is another bug, as it seems because running cmd
also fails with the same problem. 🤷♂️
Describe the bug
Traceback (most recent call last):
File "dflauncher.py", line 242, in <module>
automate_script(3)
File "dflauncher.py", line 167, in automate_script
'Username:'], timeout=4)
File "C:\Users\myusername\git\test\wexpect.py", line 1366, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "C:\Users\myusername\git\test\wexpect.py", line 1380, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "C:\Users\myusername\git\test\wexpect.py", line 1433, in expect_loop
c = self.read_nonblocking(self.maxread, timeout)
File "C:\Users\myusername\git\test\wexpect.py", line 1793, in read_nonblocking
self.logfile_read.write (s)
File "C:\Python36\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 6-19: character maps to <undefined>
To Reproduce
I've got no clue... use a colon in the expectation?
Expected behavior
Not crash.
Environment:
Describe the bug
Sometimes tests.test_expect.ExpectTestCase.test_expect_order_exact
test fails using legacy_wexpect
(I have seen with new structure too, but rarely)
See build 1.0.201 and 1.0.203, which builds the same commit, however, the first fails, while the second passes.
To Reproduce
Run unittest tests.test_expect.ExpectTestCase.test_expect_order_exact
several times, and it will fails sometimes.
Expected behavior
Never fail.
Environment:
Describe the bug
Reported by Shay Ceasary.
>>> import wexpect
>>> child = wexpect.spawn('cmd.exe')
>>> child.expect('>')
Traceback (most recent call last):
File "C:\Users\shayc\PycharmProjects\Training\venv\lib\site-packages\wexpect.py", line 2323, in read_nonblocking
s = self.readConsoleToCursor()
File "C:\Users\shayc\PycharmProjects\Training\venv\lib\site-packages\wexpect.py", line 2229, in readConsoleToCursor
if not self.__consout:
AttributeError: 'Wtty' object has no attribute '_Wtty__consout'
To Reproduce
import wexpect
child = wexpect.spawn('cmd.exe')
child.expect('>')
Environment:
Describe the bug
when i use " ret = EnvManage.child_ex.expect([patter, wexpect.TIMEOUT, wexpect.EOF], timeout=time)" to expect something。 sometimes it throw UnicodeDecodeError.
File "D:\SoftWare\WorkSpace\GitCode\AutoTest\framework\baseLib\checkLib\baseExpect.py", line 20, in check_expect
ret = EnvManage.child_ex.expect([potter, wexpect.TIMEOUT, wexpect.EOF], timeout=time)
File "D:\SoftWare\IDE\Python\Python3.7.9\lib\site-packages\wexpect\host.py", line 732, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "D:\SoftWare\IDE\Python\Python3.7.9\lib\site-packages\wexpect\host.py", line 745, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "D:\SoftWare\IDE\Python\Python3.7.9\lib\site-packages\wexpect\host.py", line 812, in expect_loop
c = self.read_nonblocking(self.maxread)
File "D:\SoftWare\IDE\Python\Python3.7.9\lib\site-packages\wexpect\host.py", line 930, in read_nonblocking
return s.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 2999: unexpected end of data
Expected behavior
my patter is regular expression : "LogicSectionId" + str(logic_id) + "=([0-9 ]+)"
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Describe the bug
The exit status of a killed process should be None
To Reproduce
import wexpect
import time
def test_expect_wait_after_termination():
"""Ensure wait on a process terminated by kill -9.
based on IsAliveTestCase::test_expect_wait_after_termination()"""
p = wexpect.spawn('sleep 3')
assert p.isalive()
p.kill(9)
time.sleep(1)
# when terminated, the exitstatus is None, but p.signalstatus
# and p.terminated reflects that the kill -9 nature.
exitstat = p.wait()
print('exitstat: {}'.format(exitstat))
assert exitstat is None
test_expect_wait_after_termination()
Expected behavior
The exit status of a killed process should be None
Environment:
I am trying to automate ssh terminal operations. I am trying to replicate a Fn+P key on the ssh console using child.send()
The terminal I use has a macro recording option, from that I was able to capture the character it sends which is chr(27) + "~[29~~"
.
I tried to use the same in child.send(chr(27) + "~[29~~")
in wexpect, the console throws a message saying unmapped key
I do not understand what "~[29~~"
means.
Issue: Wexpect's sendline method fails calling from Spyder3 IDE.
Reproduce: Run cmd.py
example code from exampes
folder from Spyder.
runfile('D:/bt/wexpect/examples/cmd.py', wdir='D:/bt/wexpect/examples')
Microsoft Windows [Version 10.0.17763.437]
(c) 2018 Microsoft Corporation. All rights reserved.
D:\bt\wexpect\examples>[PyINPUT_RECORD(EventType=1) (KEY_EVENT), PyINPUT_RECORD(EventType=1) (KEY_EVENT)]
{'Size': PyCOORDType(X=80,Y=16000), 'CursorPosition': PyCOORDType(X=23,Y=3), 'Attributes': 7, 'Window': PySMALL_RECTType(Left=0,Top=5,Right=79,Bottom=29), 'MaximumWindowSize': PyCOORDType(X=80,Y=64)}
Traceback (most recent call last):
File "<ipython-input-1-5e47c42ff79e>", line 1, in <module>
runfile('D:/bt/wexpect/examples/cmd.py', wdir='D:/bt/wexpect/examples')
File "C:\Users\usr\AppData\Local\Programs\Python\Python37\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
execfile(filename, namespace)
File "C:\Users\usr\AppData\Local\Programs\Python\Python37\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "D:/bt/wexpect/examples/cmd.py", line 30, in <module>
p.sendline('ls')
File "C:\Users\usr\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py", line 997, in sendline
n = self.send(s)
File "C:\Users\usr\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py", line 1824, in send
c = self.wtty.write(s)
File "C:\Users\usr\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect.py", line 2140, in write
wrote = self.__consin.WriteConsoleInput(records)
error: (6, 'WriteConsoleInput', 'The handle is invalid.')
Describe the bug
Wexpect cannot run inside venv. (Note wexpect works inside virtualenv)
To Reproduce
Create...:
python -m venv myvenv
...and activate venv
myvenv\Scripts\activate
Install wexpect:
python -m pip install wexpect
Run any of from wexpect examples:
python examples\hello_wexpect.py
Expected behavior
Not to crash with EOF
Environment:
Describe the bug
if I don't interact with the process, expect() takes increasing time to return.
what is most strange is that elapsed time will slowly approach the time between two sendline (inactivity time).
More time passes between two sendline, more times it takes for returning after I execute a new sendline().
To Reproduce
import wexpect
import time
child = wexpect.spawn('cmd.exe')
child.expect('>')
for _ in range(10):
child.sendline('echo "hello"')
starting_time = time.time()
child.expect('>')
print("Expect Elapsed time:",time.time() -starting_time)
time.sleep(5) #if you execute sleep(10) expect will soon take 10 seconds instead of 5
child.sendline('exit')
child.wait()
Expected behavior
"Expect elapsed time" shouldn't depend on how much time I didn't iteracted with the process.
Output
Expect Elapsed time: 0.07507729530334473
Expect Elapsed time: 2.6089940071105957
Expect Elapsed time: 3.860004425048828
Expect Elapsed time: 4.498199224472046
Expect Elapsed time: 4.816983938217163
Expect Elapsed time: 4.947844982147217
Expect Elapsed time: 5.021565198898315
Expect Elapsed time: 5.082917213439941
Expect Elapsed time: 5.092726707458496
Expect Elapsed time: 5.106329441070557
Environment:
Describe the bug
The program using wexpect needs to do some final cleanup whenever the user chooses to end the program with Control-C. However, the Python code normally used for catching Control-C does not appear to work after wexpect is used.
To Reproduce
Steps to reproduce the behavior are as follows.
(1) Save the code below in a file called control_c.py
(2) Bring wexpect into the Python environment (pip install wexpect)
(3) Run the code using "python control_c.py"
(4) Wait for the program to output "Starting", then enter Control-C within 5 seconds. This will show the program responding to Control-C in the desired manner,
(4) Run the code again using "python control_c.py"
(5) This time, allow the program to run more than 5 seconds, until the output from a 'ping' command appears, then enter Control-C within 5 seconds. This will show the program ending abruptly, without executing the code associated with catching Control-C.
import signal # Control-C handling
import sys # Control-C handling
import time # Delay timing
import wexpect
# Control-C handler
def signal_handler(sig, frame):
print("\n---- Stopped with Control-C ----")
sys.exit(0)
# Initialize Control-C catching
signal.signal(signal.SIGINT, signal_handler)
# main()
def main():
print('Starting')
time.sleep(5) # Try Control-C here
output, status = wexpect.run("ping localhost -n 1", \
withexitstatus = True)
print('ouput =', output, '\nstatus =', status)
time.sleep(5) # Try Control-C here
print('Ending')
if __name__ == "__main__":
main()
else:
pass
Expected behavior
There is a need to be able to catch Control-C in a Python program while using wexpect, because there is no other way to make sure some final cleanup code is executed before the program ends.
Screenshots
None. The code provided above should demonstrate the issue.
Environment:
Additional context
I'm hoping there's an easy fix or a reasonable work-around for this issue. (And if I'm doing something wrong, then I wouldn't mind at all if you can tell me what that is!)
trying to set that ENV var in the script:
import os
os.environ['WEXPECT_SPAWN_CLASS'] = 'SpawnPipe'
os.environ['WEXPECT_LOGGER_LEVEL']='INFO'
from wexpect import spawn
from wexpect import TIMEOUT, EOF
yields this error at the end of my script
Traceback (most recent call last):
File "C:\misc\my_script_dir\wexpect\host.py", line 312, in __del__
logger.info('Deleting...')
File "C:\Python36\lib\logging\__init__.py", line 1308, in info
self._log(INFO, msg, args, **kwargs)
File "C:\Python36\lib\logging\__init__.py", line 1444, in _log
self.handle(record)
File "C:\Python36\lib\logging\__init__.py", line 1454, in handle
self.callHandlers(record)
File "C:\Python36\lib\logging\__init__.py", line 1516, in callHandlers
hdlr.handle(record)
File "C:\Python36\lib\logging\__init__.py", line 865, in handle
self.emit(record)
File "C:\Python36\lib\logging\__init__.py", line 1071, in emit
self.stream = self._open()
File "C:\Python36\lib\logging\__init__.py", line 1061, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
NameError: name 'open' is not defined
Exception ignored in: <bound method SpawnBase.__del__ of <wexpect.host.SpawnPipe object at 0x000002444AD03E48>>
Traceback (most recent call last):
File "C:\misc\my_script_dir\wexpect\host.py", line 320, in __del__
File "C:\Python36\lib\logging\__init__.py", line 1320, in warning
File "C:\Python36\lib\logging\__init__.py", line 1444, in _log
File "C:\Python36\lib\logging\__init__.py", line 1454, in handle
File "C:\Python36\lib\logging\__init__.py", line 1516, in callHandlers
File "C:\Python36\lib\logging\__init__.py", line 865, in handle
File "C:\Python36\lib\logging\__init__.py", line 1071, in emit
File "C:\Python36\lib\logging\__init__.py", line 1061, in _open
NameError: name 'open' is not defined
Describe the bug
Traceback (most recent call last):
File "C:\Users\dream\PycharmProjects\pythonProject\venv\lib\site-packages\wexpect\host.py", line 878, in connect_to_child
self.pipe = win32file.CreateFile(
pywintypes.error: (2, 'CreateFile', '系统找不到指定的文件。')
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Traceback (most recent call last):
File "C:\Users\dream\PycharmProjects\pythonProject\venv\lib\site-packages\wexpect\host.py", line 878, in connect_to_child
self.pipe = win32file.CreateFile(
pywintypes.error: (2, 'CreateFile', '系统找不到指定的文件。')
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
When working with windows server, as it is now, when you import wexpect, a log file is generate even if you don't desire it. This causes Windows Server file permission erros for users that doesn't have permission to file write.
Describe the solution you'd like
Log file should be generate as request
Describe alternatives you've considered
Comment all logger lines to avoid issues with Wi
Additional context
logger = logging.getLogger('wexpect')
if 'dev' in __version__ :
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)
fh = logging.FileHandler('wexpect.log', 'w', 'utf-8')
formatter = logging.Formatter('%(asctime)s - %(filename)s::%(funcName)s - %(levelname)s - %>(message)s')
fh.setFormatter(formatter)
logger.addHandler(fh)
logger.info('wexpect imported; logger working')
Describe the bug
always get Error: no spawn class: {spawn_class_name} when import wexpect
To Reproduce
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wexpect
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\wexpect\__init__.py", line 48
print(f'Error: no spawn class: {spawn_class_name}')
^
SyntaxError: invalid syntax
>>>
Expected behavior
import wexpect without error
Environment:
Issue: When the program prints to stderr
there are many rubbish information in before
field.
Reproduce:
p = wexpect.spawn('cmd')
p.expect('>')
p.before
p.sendline('asd')
p.expect('>')
p.before
Is your feature request related to a problem? Please describe.
I am trying to add windows support to my project and encoding-related args of spawn
are not implemented.
To be specific, encoding
and codec_errors
are not implemented. I experienced this with WEXPECT_SPAWN_CLASS=SpawnSocket
, probably true with other spawn classes.
Describe the solution you'd like
encoding
and codec_errors
arguments of spawn
should be added and behave as in pexpect
.
Describe the bug
Sometimes the before string is confused. Some characters missing.
To Reproduce
import wexpect
import time
print(wexpect.__version__)
def testPath():
# Path of cmd executable:
cmdPath = 'cmd'
cmdPrompt = '>'
referenceOut = None
while True:
# Start the child process
p = wexpect.spawn(cmdPath)
# Wait for prompt
p.expect(cmdPrompt)
# Send a command
p.sendline('ls')
# time.sleep(0.6) <= this sleep solve...
p.expect(cmdPrompt)
print(cmdPath + " >>" + p.before + '<<')
if referenceOut:
if referenceOut != p.before:
p.interact()
time.sleep(5)
raise Exception()
else:
referenceOut = p.before
testPath()
Expected behavior
Script above should never stop.
Environment:
Additional context
interact()
console shows correct behavior.cmd.exe
can reproduce this issue for now. (Any python simulation works correctly)p.expect(cmdPrompt)
solve.Describe the bug
It seems that logfile parameter in wexpect.host.SpawnPipe does not work
To Reproduce
import wexpect
f = open("test.txt","w")
child = wexpect.spawn("cmd.exe",encoding="UTF-8",logfile=f)
child.expect(">")
child.send("dir")
child.sendeof()
f.close()
Expected behavior
command output should be written to logfile
open the file after running script only to get a blank logfile
Environment:
My expected string is found (something like press enter to continue
), but using sendline('')
leaves the program hanging. Trying to use import pdb; pdb.set_trace()
and manually re-sending the newline fails too (still hangs). If I use p.interact()
instead of breaking with pdb.set_trace()
, I get a new console/terminal popping up, showing the whole previous console output log, I see a lot of weird characters like ���������
If I press enter in the popped-up console, then my program continues running (but I don't know how to return control to Python).
How do I get sendline working properly?
(Sorry this is a work project which I can't post code of... I'll try to replicate with something I can share)
Describe the bug
Wexpect cannot be used in project which uses pytest
To Reproduce
import wexpect
def test_wexpect():
executable = 'tclsh'
prompt = '% '
child_proc = wexpect.spawn(executable)
child_proc.expect(prompt, timeout=3)
child_proc.terminate()
Run this script in pytest.
Expected behavior
Pytest should print the results. Wexpect eat the console.
Environment:
Describe the bug
When I run a telnet client session through wexpect.spawm API, it gives timeout and doesn't match the prompt pattern that I provided. I am using Python 3.7.4.
My sample code:
def wexpect_telnet():
print("In wexpect_telnet")
child = wexpect.spawn('telnet')
child.expect("Microsoft Telnet> ")
I got following error.
C:\PythonWork\Sandbox1>python Keywords.py
In wexpect_telnet
Traceback (most recent call last):
File "C:\Users\bwn6286\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect\host.py", line 809, in expect_loop
raise TIMEOUT('Timeout exceeded in expect_any().')
wexpect.wexpect_util.TIMEOUT: Timeout exceeded in expect_any().
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Keywords.py", line 52, in <module>
wexpect_telnet()
File "Keywords.py", line 36, in wexpect_telnet
child.expect("Microsoft Telnet> ")
File "C:\Users\bwn6286\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect\host.py", line 732, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "C:\Users\bwn6286\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect\host.py", line 745, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "C:\Users\bwn6286\AppData\Local\Programs\Python\Python37\lib\site-packages\wexpect\host.py", line 843, in expect_loop
raise TIMEOUT(f'{e}\n{self}')
wexpect.wexpect_util.TIMEOUT: Timeout exceeded in expect_any().
<wexpect.host.SpawnPipe object at 0x0000019DEB6E7E08>
command: C:\WINDOWS\system32\telnet.EXE
args: ['C:\\WINDOWS\\system32\\telnet.EXE']
searcher: searcher_re:
0: re.compile("Microsoft Telnet> ")
buffer (last 100 chars):
before (last 100 chars):
after: <class 'wexpect.wexpect_util.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
host_pid: 4540
child_fd: None
closed: False
timeout: 30
delimiter: <class 'wexpect.wexpect_util.EOF'>
maxread: 60000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.1
delayafterterminate: 2
C:\Users\bwn6286\PythonWork\Sandbox1>
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Additional context
Add any other context about the problem here.
Describe the bug
Sometimes if timeout
is None
wexpect crashes.
To Reproduce
Run test_timeout_none
testcase.
Expected behavior
Not to crash, should wait forever (EOF
).
Environment:
Describe the bug
Regex is not working propertly when iterate lines from promt in Windows 10.
A command is sent to cmd, it is iterated, but never find EOF. Instead of this, the expect regex raises timeout.
After hour and hours spent trying to debug, i could not find the fix.
An example:
command = r"c:\mysql\bin\mysql_install_db.exe --service=comerzzia-mysql --password=admincmz --innodb_page_size=16K"
prompt = '[A-Za-z]\:.+>
child = wexpect.spawn('cmd.exe')
child.expect(prompt)
The output of this command is something like this:
c:\mysql\bin\mysql_install_db.exe --service=comerzzia-mysql --password=admincmz --innodb_page_size=16K
Default data directory is c:\mysql\data
Running bootstrap
2021-02-06 21:47:15 0 [Note] c:\mysql\bin\mysqld.exe (mysqld 10.4.12-MariaDB) starting as process 16012 ...
Removing default user
Setting root password
Creating my.ini file
Registering service 'comerzzia-mysql'
FATAL ERROR: CreateService failed (1073)
https://mariadb.com/kb/en/installation-issues-on-windows contains some help
for solving the most common problems. If this doesn't help you, please
leave a comment in the Knowledge Base or file a bug report at
https://jira.mariadb.org
When the reader gets the last line, raises timeout, EOF is not being recogniced.
To try to fix, i've set delimiter to "prompt" value, but the regex seems to not being working well, because in the line that finds FATAL ERROR:
it ends.
Instead of prompt, i've tried setting delimiter as >
and it works, but i dont think its a good solution...
TIP
I'm having the same issue with pexpect library.
Environment:
Run the python.py example
python examples\python.py
D:\bt\wexpect>python examples\python.py
Traceback (most recent call last):
File "examples\python.py", line 26, in <module>
p.sendline('Bob')
File "C:\Users\usr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wexpect.py", line 999, in sendline
n = n + self.send (os.linesep)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
It would be nice if the hello_wexpect example worked on Windows.
# run list directory command
child.sendline('dir')
# Waiting for 'C:\>' prompt
child.expect('[A-Z]\:.+>')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.