title: PhP shell_exec python code - how to avoid repetitive initiation of python objects
body: <p>
  In "webpage1.php":</p>
  
  <pre><code>shell_exec("\usr\local\bin\python3.5 code1.py")
  </code></pre>
  
  <p>In "code1.py":</p>
  
  <pre><code>import bigClass
  obj1 = bigClass() # costs &gt;1 minute to initiate
  obj1.dosomething()
  </code></pre>
  
  <p>The problem is that everytime webpage1 is called by a visitor to the website, a bigClass object is initiated from fresh, costing a lot of time. </p>
  
  <p>Is there a way that I have this obj1 initiated beforehand, and the shell_exec simple gets a handle to it and calls its method?</p>