title: ImportError: No module named
body: <p>I am a newbie.</p>
  
  <p>Problem statement :</p>
  
  <p>In directory sfdc_bulk i have 2 file 
  1)helper.py
  2)sfdclogin.py</p>
  
  <p>helper.py</p>
  
  <pre><code>import xml.dom.minidom as DOM
  
  
  def getElemVal(xmlString,elemName):
      #tree = ET.parse('test.xml')
      #print tree
      dom = DOM.parseString(xmlString)
      val=dom.getElementsByTagName(elemName)
      ret=None
      if len(val) &gt;0 :
          ret=val[0].toxml()
          #.replace('&lt;' + ret + '&gt;', '').replace('&lt;/' + ret + '&gt;', '')
          ret=ret.replace('&lt;' +elemName+ '&gt;','').replace('&lt;/' + elemName + '&gt;', '')
      return ret
  </code></pre>
  
  <p>sfdclogin.py</p>
  
  <pre><code>from helper import getElemVal
  
  print getElemVal('&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;foo&gt;bar&lt;/foo&gt;', 'foo')
  </code></pre>
  
  <p>inside the directory sfdc_bulk
  using ubuntu terminal:</p>
  
  <p>python sfdclogin.py</p>
  
  <p>it returns bar </p>
  
  <p>but after modifying the sfdclogin file to </p>
  
  <pre><code>from sfdc_bulk.helper import getElemVal
  
  print getElemVal('&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;foo&gt;bar&lt;/foo&gt;', 'foo')
  </code></pre>
  
  <p>i am getting the follwing error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "sfdclogin.py", line 2, in &lt;module&gt;
      from sfdc_bulk.helper import getElemVal
  ImportError: No module named sfdc_bulk.helper
  </code></pre>