How to properly paste Python function block into python console? Hi i have some questions :


i want to paste block of function into the python console and got a lot of indentation error. Is this a bug or do i miss something ? i'm using 2.79. 
I'm new in coding. What is the best IDE for doing interactive debugging regarding building python code/function for Blender ?


Anyone can help ?

class VIEW3D_MT_edit_mesh_looptools(bpy.types.Menu):
    """    LOOPTOOLS    """
    bl_idname = "loop.tools" 
    bl_label = "LoopTools"

    def draw(self, context):
        layout = self.layout
        layout.operator("mesh.looptools_bridge", text="Bridge").loft = False
        layout.operator("mesh.looptools_circle")
        layout.operator("mesh.looptools_curve")
        layout.operator("mesh.looptools_flatten")
        layout.operator("mesh.looptools_gstretch")
        layout.operator("mesh.looptools_bridge", text="Loft").loft = True
        layout.operator("mesh.looptools_relax")
        layout.operator("mesh.looptools_space")
There is a solution, usually when I encounter this problem, I replace "TAB"'s with spaces. Here is the interesting thing, you can replace a "TAB" with any number of spaces. You could replace a TAB with a single space, or multiple spaces.

Now, for the second part of your question, any text editor that allows you to set "TAB" to spaces, so in "sublime text 3" which I use you would go to "view"->"indentation"->"Indent Using Spaces".

Here is the fun part, "TAB" with in a python file is not a problem for the python interpreter, it works fine. Its just an issue when you pasting to the command line.

Also, I don't know what your question has to do with Blender, this should be an S O question.