I think that this would get pretty ugly in a web app, though it would probably work. Here are the problems I see: - has to run on Windows (TG performs much more slowly on Windows in my experience) - overhead of importing win32all/pywin32 (a fairly large package) - memory usage would go through the roof, at least if this was a commonly accessed feature - COM stuff is a pain to debug - you don't have much control over when the COM object is actually destroyed/released by Python, not sure if this would be a problem in practice, though - have to learn to Word/Excel object models
Like I said though, it should work if you can't find a better solution, but I prefer to restrict COM to the desktop app and batch processing arenas. Kevin Horn On 7/16/07, Mark Ramm <[EMAIL PROTECTED]> wrote: > > > > I would like to add the option for my client to download ready to print > > invoices as one big doc, and am wondering what people would use to do > > that. I have heard good things about the Apache POI project, but it > > seems to have only Ruby bindings. Anyone have any suggestions of what > > they like? > > I wouldn't say that I like this, but you can use win32all to script > com objects, and since both word and excel are com enabled, you can > have your server open up word/excel and manipulate documents. > > I've done this before outside of TurboGears, and it works reasonably > well. I remember some strange ideosyncracies in the word COM api, > but we did get ultimately get it to work reliably. > > Of course, this only works if you're running on windows and you're > willing to install word/excel on your server. But it does allow you > the maximum possible flexibility in what documents you want to create. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

