How to stop CLion from automatic line breaking in string when printing to the Console in Python

  carriage-return, clion, printing, python, windows

Surprisingly I didn’t find an answer to this seemingly very common problem. In Python when I print something to the CLion Console when the printed text is longer than 80 characters, an automatic line break is inserted. In hexadecimal I can see the inserted symbol is carriage return (0D 0A) on Windows. How can I stop this from happending?

Example:

print("99b17c2b92123eb0ba2a0afb2568d18247fc2b24385a65b8e2da7245bef278f799b17c2b92123eb0ba2a0afb2568d18247fc2b24385a65b8e2da7245bef278f7")

On the console it will automatically insert a line break after 80 characters:

Connected to pydev debugger (build 203.7148.70)
99b17c2b92123eb0ba2a0afb2568d18247fc2b24385a65b8e2da7245bef278f799b17c2b92123eb0
ba2a0afb2568d18247fc2b24385a65b8e2da7245bef278f7

I just want this to be printed unmodified like as follows:

Connected to pydev debugger (build 203.7148.70)
99b17c2b92123eb0ba2a0afb2568d18247fc2b24385a65b8e2da7245bef278f799b17c2b92123eb0ba2a0afb2568d18247fc2b24385a65b8e2da7245bef278f7

Source: Windows Questions

LEAVE A COMMENT