Module Assign NameStore Str Import alias Import alias Import alias Assign NameStore Call NameLoad NameLoad Str FunctionDef arguments args defaults body Expr Str If UnaryOpNot NameLoad body Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num Index Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore Call NameLoad FunctionDef arguments args defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad If NameLoad body Return NameLoad orelse If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Return NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad orelse If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad orelse Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad Str TryFinally body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr finalbody Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Assign NameStore NameLoad orelse If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Assign NameStore NameLoad orelse If Call NameLoad NameLoad Str body Assign NameStore NameLoad orelse Assign NameStore NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad
N/A N/A __author__ czerwin@scalyr.com N/A inspect N/A os N/A sys N/A __is_py2exe__ N/A hasattr sys frozen scalyr_init N/A N/A N/A N/A N/A Initializes the environment to execute a Scalyr script.

    This should be invoked by any Scalyr module that has a main (i.e., can invoked by the commandline to
    perform some action).

    It performs such tasks as ensures PYTHONPATH include the Scalyr package.
     N/A N/A __is_py2exe__ N/A N/A N/A __add_scalyr_package_to_path N/A __determine_package_root N/A N/A N/A N/A N/A Returns the absolute file path to the package root.

    This must be invoked before the current working directory is changed by the code, so therefore should be
    invoked during the module load.

    @return: The absolute file path for the package root.
     N/A N/A __is_py2exe__ N/A N/A base N/A N/A os getcwd N/A file_path N/A N/A N/A N/A inspect stack N/A 1 N/A 1 N/A N/A N/A N/A N/A os path isabs file_path N/A N/A file_path N/A N/A N/A os path join base file_path N/A file_path N/A N/A N/A os path dirname N/A N/A N/A os path realpath file_path N/A N/A N/A N/A N/A os path dirname N/A unicode N/A sys executable N/A N/A sys getfilesystemencoding N/A file_path N/A N/A __package_root__ N/A __determine_package_root get_package_root N/A N/A N/A N/A N/A Returns the absolute path to the scalyr_agent Python package, including the scalyr_agent directory name.

    @return: The path to the scalyr_agent directory (which contains the Python package).
    @rtype: str
     N/A __package_root__ N/A get_install_root N/A N/A N/A N/A N/A Returns the absolute path to the root of the install location to scalyr-agent-2.  This
    works for the different types of installation such as RPM and Debian, as well as when this
    is running from the source tree.

    For example, it will return '/usr/share/scalyr-agent-2', for Linux installs and
    the top of the repository when running from the source tree.

    @return:  The path to the scalyr-agent-2 directory.
    @rtype: str
     N/A parent_of_package_install N/A N/A N/A os path dirname N/A get_package_root N/A __is_py2exe__ N/A N/A parent_of_package_install N/A N/A N/A N/A N/A N/A os path basename parent_of_package_install py N/A N/A parent_of_package_install N/A N/A N/A N/A N/A os path dirname parent_of_package_install N/A __add_scalyr_package_to_path N/A N/A N/A N/A N/A Adds the path for the scalyr package and embedded third party packages to the PYTHONPATH.
     N/A N/A N/A N/A sys path append N/A N/A N/A os path dirname N/A get_package_root N/A N/A N/A N/A sys path append N/A N/A N/A os path join N/A get_package_root third_party N/A __determine_version N/A N/A N/A N/A N/A Returns the agent version number, read from the VERSION file.
     N/A in_install N/A N/A N/A os path join N/A get_install_root VERSION N/A in_package N/A N/A N/A os path join N/A get_package_root VERSION N/A N/A N/A N/A os path isfile in_package N/A N/A version_path in_package N/A N/A N/A N/A N/A os path isfile in_install N/A N/A version_path in_install N/A N/A N/A Exception Could not locate VERSION file! N/A version_fp N/A open version_path r N/A N/A N/A N/A N/A N/A N/A version_fp readline strip N/A N/A N/A N/A version_fp close N/A N/A SCALYR_VERSION N/A __determine_version N/A PACKAGE_INSTALL 1 N/A TARBALL_INSTALL 2 N/A DEV_INSTALL 3 N/A MSI_INSTALL 4 __determine_install_type N/A N/A N/A N/A N/A Returns the type of install that was used for the source currently running.

    @return: The install type, drawn from the constants above.
    @rtype: int
     N/A install_root N/A get_install_root N/A N/A N/A N/A os path exists N/A N/A N/A os path join install_root packageless N/A N/A install_type TARBALL_INSTALL N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join install_root run_tests.py N/A N/A install_type DEV_INSTALL N/A N/A N/A hasattr sys frozen N/A N/A install_type MSI_INSTALL N/A N/A install_type PACKAGE_INSTALL N/A install_type N/A N/A INSTALL_TYPE N/A __determine_install_type