Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to wrap lines automatically in Python Spyder?

I'm new to Python. I'm using Spyder 4.0.1, Python 3.7. The Spyder built-in PEP-8 convention code style check returns error E501 (line too long). Although I set the vertical line and wrap lines, it still shows error for the long characters line. Pycharm would wrap lines automatically, but I cannot find any effective solution in Spyder. What should I do? Do I have to press Enter manually for the long line? Thanks.

like image 620
Timon Avatar asked Jul 10 '20 14:07

Timon


Video Answer


2 Answers

In Windows Go To Tools->Preferences->Editor and select Wrap lines.

enter image description here

like image 97
Vatsal Shah Avatar answered Sep 23 '22 14:09

Vatsal Shah


If you use mac, you need to go to Python on the left right corner then click on Preferences. enter image description here


Then go to Editor, and check Wrap lines. enter image description here

like image 32
Kailey Avatar answered Sep 23 '22 14:09

Kailey