How to trigger the default browser from Zope?
I'm in the need to create local alerts to be seen as web pages at the PC where Zope runs as an NT service, and I've successfully tested the python module 'webbrowser', outside of the Zope environment: def trigger_browser(url): import webbrowser webbrowser.open(url) But after copying it in the Extensions folder and loading it via an External Method, nothing happens. Any other code that I put after the last line will work, but the browser won't trigger at all. I'm using Zope 2.6.1 for Win32. I've also tried with both, the official Python distribution + win32all, and ActivePython, but it's all the same. (The registry keys were modified accordingly, and the computer restarted.) And curiously, if I load Zope as a standalone app, then the browser does trigger fine. (The service in all cases was set up to be started by the Administrator's account ) Has anyone on the list had a similar problem? To run Zope as standalone isn't currently an option. Any ideas? :) Ausum
I think there's more magic you need to actually get a service to spawn a desktop / user process. (although I couldn't tell you what it is :( look at win32service or win32serviceutil maybe. Have you tested it with IE already loaded / running? Not sure why I'm asking... just looking for more info. ----- Original Message ----- From: "Ausum Studio" <ausum_studio@hotmail.com> To: <zope@zope.org> Sent: Sunday, July 20, 2003 8:34 PM Subject: [Zope] How to trigger the default browser from Zope?
I'm in the need to create local alerts to be seen as web pages at the PC where Zope runs as an NT service, and I've successfully tested the python module 'webbrowser', outside of the Zope environment:
def trigger_browser(url): import webbrowser webbrowser.open(url)
But after copying it in the Extensions folder and loading it via an External Method, nothing happens. Any other code that I put after the last line will work, but the browser won't trigger at all. I'm using Zope 2.6.1 for Win32. I've also tried with both, the official Python distribution + win32all, and ActivePython, but it's all the same. (The registry keys were modified accordingly, and the computer restarted.) And curiously, if I load Zope as a standalone app, then the browser does trigger fine. (The service in all cases was set up to be started by the Administrator's account )
Has anyone on the list had a similar problem? To run Zope as standalone isn't currently an option. Any ideas? :)
Ausum
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Ausum Studio -
Bobb