Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line output is clipped to 80 columns #197

Open
ijustlovemath opened this issue Dec 14, 2022 · 0 comments
Open

Line output is clipped to 80 columns #197

ijustlovemath opened this issue Dec 14, 2022 · 0 comments

Comments

@ijustlovemath
Copy link

ijustlovemath commented Dec 14, 2022

Hi,

I'm trying to support running a python script that redirects stdout in git-bash. I've settled on a magic invocation that seems to work:

winpty -Xallow-non-tty -Xplain python.exe -u /path/to/script.py > my_output_file.txt

However, lines longer than 80 characters that python redirects from stdout are clipped and the remainder moved to new lines. I did a little digging, and it seems like the problem might be that the size is set to 80 at program start:

    winsize sz = { 0 };
    sz.ws_col = 80;
    sz.ws_row = 25;

   // later...
   winpty_config_set_initial_size(agentCfg, sz.ws_col, sz.ws_row);

Is this the root of my problem? If so, would it be possible to change these values, within reason, from the command line?

No rush on this, it's for a side project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant