It's situations like that where I'd like a way to write
<?python
And dump some python code the same what you'd do php and have my web server serve it up. It would be handy, but I'm sure the uses cases are limited.