title: Unable to save string into variable
body: <p>I work with HP uCMDB to extract data from servers. In my python script I have this:</p>
  
  <pre><code>iostat_cmd = client.executeCmd('iostat -En '+disk+'|egrep \'Vendor|Size\'')
  </code></pre>
  
  <p>Which executes iostat and returns this:</p>
  
  <pre><code>-bash-3.2$ iostat -En|egrep "Vendor|Size"
  Vendor: VMware   Product: Virtual disk     Revision: 1.0  Serial No:  
  Size: 8.59GB &lt;8589934080 bytes&gt;
  </code></pre>
  
  <p>So far so good, and this is where the problems start.
  Instead of saving this into a string, it saves it as 'unicode' object.
  From this point on, I'm using string manipulations and regex patterns but none of them work, I can't strip any newline characters, I can't do a split using regex pattern etc. I can't even forcefully convert it into a string.</p>
  
  <p>Adding problematic part of the code with prints:</p>
  
  <pre><code>        iostat_cmd = client.executeCmd('iostat -En '+disk+'|egrep \'Vendor|Size\'')
          iostat_cmd = iostat_cmd.split(r'\s\s+')
          print iostat_cmd
          print type(iostat_cmd)
  jvm 3    | [u'Vendor: VMware   Product: Virtual disk     Revision: 1.0  Serial No:      \r\nSize: 8.59GB &lt;8589934080 bytes&gt;']
  jvm 3    | &lt;type 'list'&gt;
  </code></pre>
  
  <p>Basically, I want to remove newline and carriage return. Then, I want to split the string into a list using \s\s+ regex pattern (which is, 2 or more whitespaces), and then return values back to the application. Please note that I have tested this pattern online and it should work.</p>
  
  <p>I also tried like this:</p>
  
  <pre><code>        iostat_cmd = client.executeCmd('iostat -En '+disk+'|egrep \'Vendor|Size\'')
          iostat_cmd = str(iostat_cmd)
          print iostat_cmd
          print type(iostat_cmd)
  jvm 3    | Vendor: VMware   Product: Virtual disk     Revision: 1.0  Serial No:  
  jvm 3    | Size: 8.59GB &lt;8589934080 bytes&gt;
  jvm 3    | &lt;type 'str'&gt;
          iostat_cmd = iostat_cmd.replace(r'\r',' ')
          print iostat_cmd
          print type(iostat_cmd)
  jvm 3    | Vendor: VMware   Product: Virtual disk     Revision: 1.0  Serial No:  
  jvm 3    | Size: 8.59GB &lt;8589934080 bytes&gt;
  jvm 3    | &lt;type 'str'&gt;
          iostat_cmd = iostat_cmd.split(r'\s\s+')
          print iostat_cmd
          print type(iostat_cmd)
  jvm 3    | ['Vendor: VMware   Product: Virtual disk     Revision: 1.0  Serial No:    \r\nSize: 8.59GB &lt;8589934080 bytes&gt;']
  jvm 3    | &lt;type 'list'&gt;
  </code></pre>
  
  <p>Any ideas what I'm doing wrong? I can't seem to grasp it, I've done it like this for years now. Why does it save the string into an unicode object and why doesn't it split it using the pattern, nor remove the characters using replace function?</p>