You can use C-style comments in PHP:
[php]$pages = array('oct3105.html', 'nov1005.html' /*@date */);[/php]And in Python you can easily replace a substring with something else, by using 'replace':
file = open("filewrite.php", "r")
file_contents = file.read()
file.close()
new_contents = file_contents.replace("/* @date */", new_date + "/* @date */");
file = open("filewrite.php", "w")
file.write(new_contents)
file.close() However this might not be the best way to go about it. Usually, blogs store the comment and post data in a database or XML file, and then either generate the HTML on the fly, or to use caching and generate it only when the stored data is changed. Storing data directly to HTML is a bit of a headache, especially with user-created content.
There's also a lot of open source blogging software out there already. Just type "php blog" into Google and you'll see what I mean. Using off-the-shelf blogging systems might make it easier for you.