OneShotAdapter reassigns sys.stdout and sys.stderr, so it _is_ importing WebKit.OneShotAdapter, but the print is getting sucked up. Try writing to a file instead of doing a print statement -- you should find that it actually is getting there.
At 12:06 PM 11/30/01 -0500, Bill Bell wrote: >The two scripts mentioned in the subject line are identical, except >that the former invokes 'CGIAdapter' and the latter >'OneShotAdapter'. So I would expect them to behave in parallel >ways. > >However, the result of the following script (which, I claim, is really >just a pared down version of the other two): > > import sys > sys . path . insert ( 1, r'H:\Webware' ) > > import WebKit.CGIAdapter > print '... CGIAdapter imported' > > import WebKit.OneShotAdapter > print '... OneShotAdapter imported' > >consists of only > > ... CGIAdapter imported > >which is to say that the second 'import', the one for the >OneShotAdapter, does not return to this script. > >Does this seem peculiar to someone who knows this software >system? > >Stripped of exception handling logic 'OneShot.cgi' consists of the >following lines: > > import os, sys > if WebwareDir: > sys.path.insert(1, WebwareDir) > else: > WebwareDir = os.path.dirname(os.getcwd()) > webKitDir = os.path.join(WebwareDir, 'WebKit') > import WebKit.OneShotAdapter > WebKit.OneShotAdapter.main(webKitDir) > >Since, in my setup, the 'import' fails the function in the module is >not called. > >Incidentally, I'm not trying to dump work onto anybody's plate. I'd >try to suggest a fix for this, if that would be appropriate--but I'm still >a Webware newbie. > >Thanks for any comments! > >Bill >"It is the time that you have wasted for your rose that makes your rose so >important."--St-Exupery > >_______________________________________________ >Webware-discuss mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/webware-discuss -- - Geoff Talvola [EMAIL PROTECTED] _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
