Mixing languages

2008-09-08T16:12:40Z
Dave Pawson.  link
Home

Mixing languages

Horses for courses is the normal cry. As often as not you can ignore it to some extent. At other times it seems so obvious. I'm working on an update to the photoalbum software. I need some basic human interface control to loop whilst the user scans in photographs. Say Python. Then I need to pass to anything that can write out html to a file.... except in there somewhere I need to use ImageMagic to obtain the image size. I'd been using a bash shell to do it which was convenient. Then launch the browser on the generated html, calling up Javascript to interact with the image. When the user is done I finish up with a snippet of XML that I want to accumulate into a file. Next back to something (bash?) to use some XSLT to process the XML.

Nice mix there. JavaScript is restricted in terms of writing the XML to disk AFAIK, so there's a hole in the process there. I can't persuade Python to exec the bash script in a useful manner (Popen seems right but I'm getting stuck on cmd line params).

Except for image magic, I guess if I were clever I could use Java Swing stuff, but it's so weird and non-intuitive I baulk at it. Can Swing interact with the user whilst showing an image as Javascript can?

I recall being shown Python used as a web scripting language but that's quite a way out of my experience to date. More pondering needed

Changing the subject

I/we are looking for a hinge solution. this is the problem with a candidate solution sketched in. How would you mount such an inset door? Suggestions please.

Keywords: software

Comments (View)

Return to main index