AttributeError: 'str' object has no attribute 'slice'
<p>I'm writing a Sublime2 plugin and fighting a bit.</p>

<p>Code is:</p>

<pre><code>  def run(self, edit):
    self.edit            = edit
    self.view.window().show_input_panel("New Controller and View Path (ex: client_area/index )", "", self.trigger, None, None)

  def trigger(self, user_entry):
    formatted_entry = user_entry.encode('utf-8')
    print formatted_entry.__class__
    print formatted_entry
    if formatted_entry.slice('/')[0] == '':
      #some code
</code></pre>

<p>Output is:</p>

<pre><code>&lt;type 'str'&gt;
client_area/index
Traceback (most recent call last):
  File "./PluginName.py", line 27, in trigger
AttributeError: 'str' object has no attribute 'slice'
</code></pre>

<p>How is it I get <code>'str' object has no attribute 'slice'</code> ? (Python version is 2.6)</p>
