title: python read a file on web to get variable
body: <p>I have a file on my web server and i want my python script to read this file then import it as a library to have the variable from this file , but i tried to use urlparse but i was not able to do the mission exactly .</p>
  
  <p>My code :-</p>
  
  <pre><code>.....
  from urllib.parse import urlparse
  moregc = urlparse('http://www.xxxx.com/xxxx/moregc')
  from moregc import cde
  if cde == securecode:
      .....
  </code></pre>
  
  <p>I was using this code to read it from a local file and it was perfect in the job :-</p>
  
  <pre><code>from reg import cde
  if cde == securecode:
  </code></pre>
  
  <p>the point is this file will be as online regfile to protect my program from being used without permission .</p>