📄 function.py
字号:
#! /usr/bin/env python
# -*- coding: Latin-1 -*-
#==========================================================
# nom du fichier : writeInHTML.py
# description : fonctions utiles
# ===========================================================
# 閏rit l'en-t阾e HTML
def beginHTMLFile():
return "<html>\n<head>\n<title>write source code in HTML</title>\n</head>\n<body>\n<pre>\n"
# 閏rit la fin du fichier HTML
def endHTMLFile():
return "\n</pre>\n</body>\n</html>"
# renvoie vrai si la variable c contient un saut de ligne
# une tabulation ou un espace
def isSpace(c):
return (c =='\n' or c == '\t' or c == ' ' or c == '\0')
# renvoie vrai si la variable c est un caract鑢e de ponctuation
def isPunctuation(c):
return (c == '.' or c == ',' or c == ';' or c == ':' or c == '?' or c == '!' or c == '\'' or c == '/' or c == '*')
# renvoie vrai si c est une parenth鑣e, une accolade ou un crochet
def isBracket(c):
return (c == '(' or c == ')' or c == '[' or c == ']' or c == '{' or c == '}')
# revoie vrai si c est un caract鑢e sp閏ial
def isSpecialDelim(c) :
return (c == '\"' or c == '&' or c == '<' or c == '>')
# renvoie vrai si c est un d閘imiteur
def isDelimitor(c):
return (isSpace(c) or isPunctuation(c) or isSpecialDelim(c) or isBracket(c))
# renvoie le code html d'un d閘imiteur sp閏ial c pass
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -