Background Processing Functions

Errors and unexpected results
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Background Processing Functions

Post by joleenf »

What happened to the background processing functions in the jython shell? They have disappeared in the latest build.

Version: 1.01 Build-date: 2011-03-25 09:31
User avatar
Jon
Posts: 192
Joined: Fri Jan 09, 2009 8:44 pm
Location: Madison, WI

Re: Background Processing Functions

Post by Jon »

Hi, Joleen. Sorry to hear 'bout the bug.

I'm seeing something similar, but the functions and whatnot are still accessible. It's just that the files defining those functions aren't showing up in the jython library! :o

If you open up the jython shell and type "print see()" (and then enter!), do you see names like "allColorTables()" and "allDisplays()" in the output?
User avatar
jayh
Posts: 424
Joined: Thu Jan 15, 2009 10:34 pm

Re: Background Processing Functions

Post by jayh »

Hi Joleen-

These have been updated in the latest nightly. Please check it out. It looks good from my perusal, but I'm not a jython user.

Thanks, Jay
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Background Processing Functions

Post by joleenf »

Jon and Jay,

Thanks, I have a new build which looks normal. Thanks for the print see() tip!

Joleen
User avatar
Jon
Posts: 192
Joined: Fri Jan 09, 2009 8:44 pm
Location: Madison, WI

Re: Background Processing Functions

Post by Jon »

You can also use it for Python modules and Java classes (note the placement of quote marks!):

Code: Select all

# prints the contents of the "ucar.unidata.data.GeoSelection" Java class.
print see(GeoSelection)

# prints the contents of the McIDAS-V "main" object
# (identical output to "print see(McIDASV)"; this is because the "_mcv" object is an instance of the McIDASV class.
print see(_mcv)

# prints the contents of a Python package
print see(shutil)


You can also filter the output:

Code: Select all

# wildcards behave pretty much like in a Unix-style shell.
print see(pattern='make*')

# you can also filter the results for a given object; this'll output the methods within McIDASV that return a "manager" object.
print see(_mcv, pattern='.get*Manager*')

# see() will also format things so that you know which comparisons/operations an object supports
# the following will output things like "%", "**', "<="…meaning that the object supports operations like "1337**2" (doesn't work with a string!)
print see(1337)
print see('Y_HELO_THAR')
Post Reply