title: Querying in mongoexport through python
body: <p>Can Anyone explain how to export the result of a query with mongoexport inside a program in python ?</p>
  
  <pre><code>os.system('mongoexport -d fintapp -c portfolio --csv --fields userid,budget --query {"budget":{$exists:True}} -o fulbudg.csv')
  </code></pre>