title: How to encapsulate python modules?
body: <p>Is it possible to encapsulate python modules 'mechanize' and 'BeautifulSoup' into a single .py file?</p>
  
  <p>My problem is the following:
  I have a python script that requires mechanize and BeautifulSoup. I am calling it from a php page. The webhost server supports python, but doesn't have the modules installed. That's why I would like to do this.</p>
  
  <p>Sorry if this is a dumb question.</p>
  
  <p>edit: Thanks all for your answers. I think the solution for this resolves around virtualenv. Could someone be kind enough to explain me this in very simple terms? I have read the virtualenv page, but still am very confused. Thanks once again.</p>