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

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
kevinjwalters
 
Posts: 1025
Joined: Sun Oct 01, 2017 3:15 pm

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

Post by kevinjwalters »

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.

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

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

Post by danhalbert »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”