MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / read_stdout

Function read_stdout

web/pgadmin/tools/psql/__init__.py:229–239  ·  view source on GitHub ↗
(process, sid, max_read_bytes, win_emit_output=True)

Source from the content-addressed store, hash-verified

227
228
229def read_stdout(process, sid, max_read_bytes, win_emit_output=True):
230 (data_ready, _, _) = select.select([process.fd], [], [], 0)
231 if process.fd in data_ready:
232 output = process.read(max_read_bytes)
233 if win_emit_output:
234 sio.emit('pty-output',
235 {'result': output,
236 'error': False},
237 namespace='/pty', room=sid)
238
239 sio.sleep(0.01)
240
241
242def windows_platform(connection_data, sid, max_read_bytes, server_id):

Callers 1

windows_platformFunction · 0.85

Calls 2

selectMethod · 0.80
emitMethod · 0.80

Tested by

no test coverage detected