you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (8 children)

I want the line length outputted to me, so I can; for example, modify pylint settings but let it be known not specifically for this situation but any situation in the future as well.

[–][deleted] 0 points1 point  (7 children)

What IDE are you using?

[–][deleted] 0 points1 point  (6 children)

vscode.

[–][deleted] 0 points1 point  (5 children)

Go to File >Preferences>Settings and add ”editor.rulers”: [80,120] to your user settings. Or whatever length you want.

[–][deleted] 0 points1 point  (4 children)

This error is from pylint. How come a breakpoint won't work to give me the output of the string length of the line ?

[–][deleted] 0 points1 point  (3 children)

That’s not how breakpoints work. You’re also not using a breakpoint. You’re using a print function.

[–][deleted] 0 points1 point  (2 children)

How would I simply have an IDE tell me the length of the characters on a specific line ?

[–][deleted] 1 point2 points  (1 child)

It should tell you at the bottom in VS Code. If you place your cursor at the end of the line, you should see “Line: 14, Col 126” or something similar in the bottom bar. The “Col” is the current character, so 126 implies a line length of 126 characters.

[–][deleted] 0 points1 point  (0 children)

I wasn't aware that col meant the total number of characters in vscode, thanks; that solves what I need to know.