Atom: Note for Indentation Error when copying Python script to shell

Correspondence

(1) Click Atom-> Preferences ...-> Install-> Search for whitespace-> Settings. img02.tiff

(2) Check the Ignore Whitespace Only Lines check box. img03.tiff


Symptoms

When I try to copy and execute a Python script into a Python shell, I get an IndentationError. img04.tiff

Cause

When saving a file with Atom, the blank line indent space was automatically deleted. (It was indented with 2 spaces as in the 12th line below, but it is automatically deleted as in the 10th line) img05.tiff


I'm studying Python beginners and deep learning. Until the memo. Was it too known to search? I thought it was a specification. Reference: http://takezoe.hatenablog.com/entry/2015/06/21/021254


Other: Atom-runner

To use Python3, add the following to config.cson in Atom-> Config.

>"*":
>  〜
>  runner:
>    scopes:
>      python: "Python3"

Recommended Posts

Atom: Note for Indentation Error when copying Python script to shell
Error due to UnicodeDecodeError when reading CSV file with Python [For beginners]
Python Note: When assigning a value to a string
Error when trying to install psycopg2 in Python
Python script to get note information with REAPER
When I tried to introduce python3 to atom, I got stuck
Error due to conflict between python when using gurobi
Things to keep in mind when copying Python lists
Things to note when initializing a list in Python
Note to daemonize python
Articles to see when installation for Python + OpenCV fails
[Python] for statement error
How to run a Python program from within a shell script
[python] A note when trying to use numpy with Cython
[For beginners] Script within 10 lines (4. Connection from python to sqlite3)
Error when playing with python
3 months note for starting Python
~ Tips for beginners to Python ③ ~
Indentation formatting for python scripts
Introduction to Python For, While
Things to watch out for when using default arguments in Python
What I was addicted to when introducing ALE to Vim for Python
Effective Python Note Item 17 Respect for certainty when using iterators for arguments
Things to note when running Python on EC2 from AWS Lambda
"Value Error: Unable to configure handler'file_output_handler'" when starting a python program
Articles to read when Blender Python script code doesn't work in 2.80
Python script for KiCad-Pre-place footprint almost according to the schematic layout
[python] Error when installing library ramkan
Python script for ldapsearch base64 decode
Error when building mac python environment
[python] Copy script to generate copy log
boto3 (AWS SDK for Python) Note
AWS Layer Creation Script for python
Error handling when updating Fish shell
Atom preferences for comfortable Python coding
An introduction to Python for non-engineers
How to resolve "No kernel of grammar Python found" error in Atom
Things to watch out for when creating a Python environment on a Mac
How to deal with OAuth2 error when using Google APIs from Python
Python Note: When you want to know the attributes of an object
When running a Python shell from Electron, pass multiple arguments to run Python.
How to deal with SSL error when connecting to S3 with boto of Python
A note when looking for an alternative to pandas rolling for moving windows
[Python] What to do when an error related to SSL authentication is returned
A useful note when using Python for the first time in a while