File manager - Edit - /home/thefreecuj/www/python.tar
Back
test.py 0000644 00000002573 15053704071 0006106 0 ustar 00 # Copyright 1999-2014. Parallels IP Holdings GmbH. All Rights Reserved. import sys import os import re def print_environ(environ=os.environ): """Dump the shell environment as HTML.""" keys = environ.keys() keys.sort() i = 0 for key in keys: if not re.search("^HTTP_|^REQUEST_", key): continue if i == 0: print """<tr class="normal"><td>""", escape(key), "</td><td>", escape(environ[key]), "</td></tr>" i = 1 else: print """<tr class="alt"><td>""", escape(key), "</td><td>", escape(environ[key]), "</td></tr>" i = 0 def escape(s, quote=None): """Replace special characters '&', '<' and '>' by SGML entities.""" s = s.replace("&", "&") # Must be done first! s = s.replace("<", "<") s = s.replace(">", ">") if quote: s = s.replace('"', """) return s print """Content-type: text/html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> <link rel="stylesheet" type="text/css" href="../../css/style.css" /> </head> <body class="test-data"> <table cellspacing="0" cellpadding="0" border="0"> <tr class="subhead" align="Left"><th>Name</th><th>Value</th></tr>""" print_environ() print """</table> </body> </html>""" test.html 0000644 00000004155 15053704071 0006420 0 ustar 00 <!DOCTYPE html> <!--[if lt IE 7 ]><html class="ie ie6 lte9 lte8 lte7" lang="en"><![endif]--> <!--[if IE 7 ]><html class="ie ie7 lte9 lte8 lte7" lang="en"><![endif]--> <!--[if IE 8 ]><html class="ie ie8 lte9 lte8" lang="en"><![endif]--> <!--[if IE 9 ]><html class="ie ie9 lte9" lang="en"><![endif]--> <!--[if gt IE 9]><!--><html class="" lang="en"><!--<![endif]--> <head> <meta name='copyright' content='Copyright 1999-2014. Parallels IP Holdings GmbH. All Rights Reserved.'> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="Cache-Control" content="no-cache"> <title>Python test page</title> <link rel="shortcut icon" href="../../favicon.ico"> <link rel="stylesheet" href="../../css/style.css"> </head> <body> <div id="page"> <div id="wrapper"> <div id="top"> <div class="header"> <div class="header-wrapper"> <a class="product-logo" href="http://www.parallels.com/products/panel/intro"><img src="../../img/panel-logo.png" alt="Parallels Plesk"></a> <a class="company-logo" href="http://www.parallels.com"><img src="../../img/parallels-logo.png" alt="Parallels"></a> </div> </div> </div> <!-- /top --> <div id="content" class="test"> <div class="pathbar"><a href="../../index.html">Site Home Page</a> <b>></b></div> <h1>Python possibilities test page</h1> <div class="test-box"> <div class="test-box-wrap"> <p>This page allows to check the possibility to get the extension environment settings.</p> <h2>Environment</h2> <iframe id="ifr" src="test.py" height="320" width="100%" frameborder="0" name="ifr"></iframe> </div> </div> </div> <!-- /#content --> </div> </div> <div id="footer-wrapper"> <div id="footer"> This page was generated by <a href="http://www.parallels.com/products/panel/intro">Parallels Plesk</a> <span class="separator"> </span> <a class="copyright" href="http://www.parallels.com">© 1999-2014. Parallels IP Holdings GmbH. All rights reserved.</a> </div> </div> <script>if (e = document.getElementById('ifr')) e.src += '?' + Date.now();</script> </body> </html>