module homeblog.python_exemple_py_to_html

Short summary

module ensae_teaching_cs.homeblog.python_exemple_py_to_html

Helper for HTML

source on GitHub

Functions

function truncated documentation
get_first_col function related to my teachings, it tries to associate a file to a chapter of my book
py_to_html_file Converts a python script into a html file.
py_to_html_folder Converts all python files from a folder into html files.

Documentation

Helper for HTML

source on GitHub

ensae_teaching_cs.homeblog.python_exemple_py_to_html.get_first_col(file)[source]

function related to my teachings, it tries to associate a file to a chapter of my book

Paramètres:file – file name (python script)
Renvoie:a chapter

source on GitHub

ensae_teaching_cs.homeblog.python_exemple_py_to_html.py_to_html_file(file, writehtml='', addGoogleTracking=True, title=None)[source]

Converts a python script into a html file.

Paramètres:
  • folder – folder
  • writehtml – filename
  • addGoogleTracking

    add some code for the Google tracking (related to www.xavierdupre.fr), it looks like:

    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
    <script type="text/javascript">_uacct = "UA-XXXXXXX-X";urchinTracker();</script>
    
Renvoie:

the processed file (same file but with extension .html)

source on GitHub

ensae_teaching_cs.homeblog.python_exemple_py_to_html.py_to_html_folder(folder, addGoogleTracking=True)[source]

Converts all python files from a folder into html files.

Paramètres:
  • folder – folder
  • addGoogleTracking – add some code for the Google tracking (related to www.xavierdupre.fr), py_to_html_file
Renvoie:

list of processed files

source on GitHub