Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/get_preferences.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.11 ChIPS v1

get_preferences

Context: preference

Synopsis

Retrieves the preference value(s) for the specified object.

Syntax

get_preferences()
get_preferences(name)

Description

The function arguments.

Argument Description
name A string giving either an object name, such as 'curve', 'line', or 'export', or a single attribute, such as 'curve.line.style' or 'export.clobber'.

The get_preferences command retrieves the preference value(s) of the specified object. If no argument is given, all the preferences are returned as an object. If an argument is supplied then the return value is a string; the argument can either be the name of an object, such as 'curve' or 'export', or of a specific field, such as 'region.fill.style' or 'window.display'.

Some values are set to "None" in the returned structure. These entries generally correspond to attributes which may only be modified at creation time, such as the object id.


Examples

Example 1

chips> print(get_preferences("plot"))

Print all the preferences for the plot object.

Example 2

chips> print(get_preferences("label.size"))

Retrieve and print the preference value for the size attribute of the label object.

Example 3

chips> allpref = get_preferences()
chips> print(allpref.curve.line.style)
solid

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

concepts
preferences, setget
preference
get_preference, load_preferences, save_preferences, set_preference, set_preference_autoload, set_preferences
utilities
set_current