curses webbrowser modules

pehr anderson pehr at alum.mit.edu
Thu Jun 28 01:19:08 EDT 2001


Dear Alex,

Here is a brute-force idea:
Spawn or fork a new process which runs a small hunk of
python code to execute your browser.open call
in an output-redirected process environment.

If you need to have back-and-forth rather than 
launch and forget, simply split your app into 
a client-server model at some protocol layer 
that makes sense for your application.

Is there a more elegant way? 

You might be able to see something obvious by 
looking through the browser.open code.
Perhaps you could make your own "inherited" version
of the class that adds this key feature where you need
it and leaves the rest of the class in-tact.

	-pehr


Alex M wrote:
> 
> Somewhere within my curses app I have this bit of code:
> 
> session.myprofile.browser.open(session.url, 1)
> 
> The above line of code works great but Netscape ruins my windows
> when it decides to output some error message. eg error messages
> with regards to fonts. Rewriting/refreshing the damaged windows doesn't
> help.
> I have worked around this problem by
> modifying my .Xdefaults file, adding the following lines to it:
> 
> .netscape*useStderrDialog:False
> .netscape*useStdoutDialog:False
> 
> But is there any other way of suppressing browser error messages so it
> doesn't ruin my curses windows?
> 
> Thanks.
> 
> Alex Mercader
> the_cpu_fan at yahoo.com



More information about the Python-list mailing list