The best tool for polyglot programming is the Beaker Notebook: http://BeakerNotebook.com Set a variable in one language and use it in another, work with multiple languages on the same page, including javascript, and run them all interactively.
Hey, that's a really neat product! Thanks for linking. I've never even heard of this before and I wonder why.
Email me for more info.