1

This question relates to console details (width, height, etc..) as interpreted by a sub-process.

I wrote a short C program which simply outputs the width property of the CONSOLE_SCREEN_BUFFER_INFO struct. When called on it's own via a standard console window, the width prints out as 80. When called from python code via a subprocess.open() command (with the python program being called from the same standard console window), the width prints out as -23251. So clearly this width is not being taken from the parent process' console window.

Is there any way for a child process to inherit or view the details of the parent process that created it? The child process would be in C/C++, with the parent process being written in Python.

4

0 回答 0