escaping xml/html with python is very simple. It is useful to post code excepts on the blog...
>>> from xml.sax.saxutils import escape
>>> s = """<Directory /var/www/py>
... SetHandler mod_python
... PythonHandler mod_python.publisher
... PythonDebug On
... <Files ~ "\.(gif|html|jpg|png)$">
... SetHandler default-handler
... </Files>
... </Directory>
...
... """
>>> print escape(s)
<Directory /var/www/py>
SetHandler mod_python
PythonHandler mod_python.publisher
PythonDebug On
<Files ~ "\.(gif|html|jpg|png)$">
SetHandler default-handler
</Files>
</Directory>
Showing posts with label webdevel. Show all posts
Showing posts with label webdevel. Show all posts
17 September 2008
27 May 2008
Running multiple Firefox processes concurrently
start the second firefox with the following switches:
firefox -P -no-remote
If profilemanager should be started with the second instance, use instead:
firefox -profilemanager -no-remote
firefox -P
If profilemanager should be started with the second instance, use instead:
firefox -profilemanager -no-remote
Subscribe to:
Posts (Atom)