Python Indentation Error Issue
<p>I'm getting this problem on a simple test on a Python file,</p>

<pre><code>class Prueba(object):

    def __init__(self):
        self.position = 0


    def build_message(self, signal):
        message = self.position
        message = message | (0b1&lt;&lt;signal)
        s = bin(message)
        s = s[2:len(s)]
        s = (16-len(s))*'0' + s

        s0 = s[0:len(s)/2]
        s1 = s[len(s)/2:len(s)]
        s0 = s0[::-1]
        s1 = s1[::-1]
        s_final = int(s0 + s1, 2)
        return s_final

    def motor_activation(self):
        rospy.logwarn("Preparing motor to start...")
        if(self.drive_status[MC] == False and self.drive_status[READY] == False and self.drive_status[BRAKE] == False and self.drive_status[ERROR] == False):
            rospy.sleep(1)
            ####### Avtivate FG_R #######
            message = self.build_message(FG_R)
            self.setBrModbusValue(2, message)

            ##Wait a little
            rospy.sleep(1)

            ####### Avtivate FG_E #######
            message = self.build_message(FG_E)
            self.setBrModbusValue(2, message)
</code></pre>

<p>Im getting this message when trying to execute it with ipython:</p>

<pre><code>message = self.position
      ^
IdentationError:expected an indented block
</code></pre>

<p>This must be an issue of tabs mixed with spaces.</p>

<p>You can convert all the tabs into spaces by changing some settings in editor you are using.</p>

<p>In case of sublime text :
Preferences -> settings-User</p>

<p>Try saving this as Packages/User/Preferences.sublime-settings</p>

<pre><code>{
    "tab_size": 4,
    "translate_tabs_to_spaces": true
}
</code></pre>

python