File: cgi/showcode-template.txt

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML>

<!-- This is a template: use your browser's "View Source" to see its expanded form -->
<!-- Use string formatting to expand "__X__" targets here: see the .py CGI script  -->

<!-------------------------------------------------------------------------------------->

<HEAD>

<!-- UTF8 for any non-ASCII Unicode in text -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<!-- Site-wide icon -->
<link rel="shortcut icon" type="image/x-icon" href="https://learning-python.com/favicon.ico" />

<!-- Site-wide styles: footer, code -->
<link rel="stylesheet" type="text/css" href="../_main.css">

<!-- Be mobile-friendly -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Anonymous analytics to prioritize work -->
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-52579036-1', 'auto');
  ga('send', 'pageview');
</script>

<STYLE> 
LI {
    margin-bottom: 3px;    # Space between listed items, to read and tap
}
</STYLE>

<TITLE>File: %(__NAME__)s</TITLE>

</HEAD>

<!-------------------------------------------------------------------------------------->

<BODY>

<P><B><I>File</I>: %(__NAME__)s</B>    <!-- not H1: pathname may be long -->

<P>
<UL style="list-style-type: none;">
<!-- See urllib.[parse.]quote_plus for encoding, use 2 %% for 1 post formatting expr -->

<!-- Link to raw text-file content in "..": script sends plain text, inline or attachment -->
<LI>&#x21E8; Raw text
                 <A HREF="showcode.py?name=%(__NAMEURL__)s&rawmode=view">view</A> and
                 <A HREF="showcode.py?name=%(__NAMEURL__)s&rawmode=save">save</A>

<!-- Show myself: cgi/showcode.py and cgi/showcode-template.txt, relative to ".." -->
<LI>&#x21E8; Page
                 <A HREF="showcode.py?name=cgi%%2Fshowcode.py">script</A> and 
                 <A HREF="showcode.py?name=cgi%%2Fshowcode-template.txt">template</A>
</UL>

<P>
<!-- Use site-wide styling with auto-scroll, add more top space -->
<!-- Code is HTML-escaped, decoded Unicode codepoints (to be sent as UTF8) -->

<DIV style="margin-top: 30px;">
<PRE>%(__CODE__)s</PRE>
</DIV>
</P>

<!-------------------------------------------------------------------------------------->

<!-- Site-wide scrollable footer -->
<!-- This cgi subdir is outside the scope of the site's genhtml page generator, -->
<!-- and copying generated footer code here is a bad idea: requires future recopies. -->
<!-- Instead, grab a generated dummy in .. and prefix its links with ".." in the .py. -->

%(__FOOTER__)s

</BODY>
</HTML>



[Home] Books Programs Blog Python Author Training Search Email ©M.Lutz