suppress message from loadADDEImage()

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

suppress message from loadADDEImage()

Post by hproe »

Hi -

I wonder whether it would be possible to optionally suppress the (long) message that goes with each call to loadADDEImage(). This creates long logs when retrieving multi-spectral data. If thisthis request is already on the list, it is worthlie re-iterate it.

HP
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: suppress message from loadADDEImage()

Post by bobc »

Hi HP -

Can you please check what your logging level is set to? You can check this in the Advanced tab of the User Preferences window (through Edit>Preferences in the Main Display window). I find that if I have this set to DEBUG or INFO (the default logging level), then I only see one line of output in mcidasv.log for each loadADDEImage call. If I set this to the highest level, TRACE, then I see about 25 lines of output in the log file for each loadADDEImage call.

Thanks -
Bob Carp
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

Re: suppress message from loadADDEImage()

Post by hproe »

Hi Bob -

Sorry, I was not clear enough with my question/request. I am addressing the message 'adde://...' issued in the shell for each loadADDEImaeg() call, not things that go to the log file. As this message is quite long and date/time come only at the end, it is quite useless under normal operation. It is this message I would like to supress.

HP
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: suppress message from loadADDEImage()

Post by bobc »

Hi HP -

Looking through the Jython Library, it looks like the URL is printed out in the Jython Shell if the showUrls keyword is set to True, which is the default. To your loadADDEImage calls, can you tack on an extra keyword for: showUrls=False. For example:

Code: Select all

data = loadADDEImage(server='adde.ucar.edu',dataset='RTIMAGES',descriptor='GE-IR',showUrls=False)

Thanks -
Bob
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

Re: suppress message from loadADDEImage()

Post by hproe »

Hi Bob -

Many thanks for this hint - this makes things more concise. There is some inconsistency in the documentation, though. showUrls is neither listed in the User's Guide nor in loadADDEImage(), but only in _getADDEImage() where I did not look.

HP
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: suppress message from loadADDEImage()

Post by bobc »

Hi HP -

Thanks for the suggestion, I agree that it would be good to document showUrls in the User's Guide. This keyword is valid with loadADDEImage, listADDEImageTimes, and listADDEImages. This documentation update will appear in the User's Guide through Help>User's Guide in the nightly builds beginning tomorrow (07/18) and will be included in the User's Guide with next stable release of McIDAS-V as well.

Thanks -
Bob
Post Reply