title: Using flask to get the details of a system visiting my website
body: <p>I have built a website using flask (Python 2.7). I am trying to send a setup file to a system visiting my website according to the specifications of that system. Thus I want to access the cmd prompt of that system and find few things: 
  1. which os and bit that pc is working on 
  2. does it have python installed. </p>
  
  <p>Till now I was using local host so things seemed fine with my code. </p>
  
  <p>(This one is to detect the os of the system)</p>
  
  <pre><code>def index():
      var3 = subprocess.call('uname -o &gt; z2.txt' , shell = True)
      if (var3 == 0):
          return render_template("ch1.html") #ch1 says its ubuntu
      else :
          return render_template("ch2.html") #ch2 says its windows
  </code></pre>
  
  <p>I had previously checked on other windows pc and it had displayed windows which made me think my code was fine. Now when i am checking on ubuntu it still shows windows. Now i realize that the subprocess.call calls the commands on my system's cmd itself and not on the system visiting my website. 
  How can i access the visiting system's cmd to find their os, bit and whether python is installed on their system using PYTHON/Flask.</p>
  
  <p>NOTE: All of the systems visiting my website will be connected to the same wifi (if that is of any help)</p>
  
  <p>EDIT: Getting the os, bit and python installed or not on the visitor's system from my website is my main criteria. It can be by accessing the other system's cmd or in any other way possible.</p>