{"id":211,"date":"2013-07-11T16:33:00","date_gmt":"2013-07-11T16:33:00","guid":{"rendered":"http:\/\/150@jodohost.com\/\/blog\/"},"modified":"2013-07-11T16:33:00","modified_gmt":"2013-07-11T16:33:00","slug":"python-scripts-on-shared-linux-servers","status":"publish","type":"post","link":"http:\/\/www.jodohost.com\/blog\/index.php\/2013\/07\/11\/python-scripts-on-shared-linux-servers\/","title":{"rendered":"Python scripts on shared Linux servers"},"content":{"rendered":"<p>Python supports CGI scripts on shared Linux servers.<\/p>\n<p>To run Python scripts you should first make sure of the following steps:<\/p>\n<p>Step 1: Add cgi-bin as cgi-dir in the control panel on the web services section for the domain.<br \/>Step 2: Add the .py extension for Python to run against CGI on the web services section for the domain.<br \/>Step 3: Place the script inside the cgi-bin directory and make sure that the cgi-bin directory and files in it have permission of 755 to run.<br \/>Step 4: Use the shebang at the top => #!\/usr\/bin\/python and then write the script you want and then run it on the browser using the url :-<\/p>\n<p>http:\/\/domainname\/cgi-bin\/python-script.py<\/p>\n<p>That&#8217;s it! Your Python script should work fine if you have followed the steps above.<\/p>\n<p> ]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python supports CGI scripts on shared Linux servers. To run Python scripts you should first make sure of the following steps: Step 1: Add cgi-bin as cgi-dir in the control panel on the web services section for the domain.Step 2: Add the .py extension for Python to run against CGI on the web services section [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/211"}],"collection":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":0,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}