Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Extra four spaces in Python code from cut & paste in Firefox
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Extra four spaces in Python code from cut & paste in Firefox

by kevinjwalters on Sat Mar 28, 2020 3:59 pm

I've been doing a bit of remote support for a friend who I have introduced to the CircuitPython world. His first problem and frustration was a trivial program not working. It turned out to be a classic IndentationError: unexpected indent error which one might expect for a programmer not familiar with Python but in this case it actually relates to cut and paste of a small, valid program. Chrome is ok but in Firefox if you manually select some text with the mouse from a Learn Guide code block and cut and paste it (at least on Windows) then it prepends four spaces to each line which is disasterous for Python. The nifty copy code button does work ok. This is confusing for beginners.

Is this a Firefox bug or a Learn System bug?
Last edited by kevinjwalters on Sat Mar 28, 2020 4:58 pm, edited 1 time in total.

kevinjwalters
 
Posts: 635
Joined: Sun Oct 01, 2017 3:15 pm

Re: Extra four spaces in Python code from cut and paste in F

by danhalbert on Sat Mar 28, 2020 4:47 pm

Thanks, I've passed this on to the Learn Guide maintainers.

danhalbert
 
Posts: 2055
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.