3.144.12.205 |    

Navigation

Google Advertisement

Diese Funktion liest eine Datei in einen String und gibt diesen zurück. Ich nutze es um HTML Template-Dateien einzulesen.

return_template
  1. def return_template( file ):
  2.     """return_template --- This function load the current defined template file.
  3.     If the template file not exists, the function dies with an error message.
  4.  
  5.     (string) string return_template( (string) file )"""
  6.     fh = open( file, 'r' )
  7.     tpl = fh.read()
  8.     fh.close()
  9.     return tpl
Parsed in 0.003 seconds at 125.65 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 2 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)