MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / windows_platform

Function windows_platform

web/pgadmin/tools/psql/__init__.py:242–256  ·  view source on GitHub ↗
(connection_data, sid, max_read_bytes, server_id)

Source from the content-addressed store, hash-verified

240
241
242def windows_platform(connection_data, sid, max_read_bytes, server_id):
243 process = PtyProcess.spawn('cmd.exe', env=get_user_env())
244
245 process.write(r'"{0}" "{1}" 2>>&1'.format(connection_data[0],
246 connection_data[1]))
247 process.write("\r\n")
248 app.config['sessions'][request.sid] = process
249 pdata[request.sid] = process
250 cdata[request.sid] = process.fd
251 open_psql_connections[request.sid] = server_id
252 set_term_size(process, 50, 50)
253
254 while process.isalive():
255 read_stdout(process, sid, max_read_bytes,
256 win_emit_output=True)
257
258
259def non_windows_platform(parent, p, fd, data, max_read_bytes, sid):

Callers 1

pty_handel_ioFunction · 0.85

Calls 4

get_user_envFunction · 0.85
set_term_sizeFunction · 0.85
read_stdoutFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected