4.5.3 Long Input

The KASH interface reads in even very long input (using files) in a robust manner, as long as you are creating a new object. Note: Using kash.eval for long input is much less robust, and is not recommended.

sage: a = kash(range(10000))

Note that KASH seems to not support string or integer literals with more than 1024 digits, which is why the above example uses a list unlike for the other interfaces.

Module-level Functions

__doctest_cleanup( )

is_KashElement( x)

kash_console( )

kash_version( )

reduce_load_Kash( )

Class: Kash

class Kash
Interface to the Kash interpreter.

AUTHORS: William Stein and David Joyner

Kash( self, [max_workspace_size=None], [maxread=None], [script_subdirectory=True], [restart_on_ctrlc=user], [logfile=100000], [server=None])

INPUT:
    max_workspace_size -- (default: None)
            set maximal workspace memory usage to <mem>
            <mem> stands for byte-wise allocation
            <mem>k stands for kilobyte-wise allocation
            <mem>m stands for megabyte-wise allocation

Functions: console,$  $ eval,$  $ get,$  $ help,$  $ help_search,$  $ set,$  $ version

eval( self, x, [newlines=False])

Send the code in the string s to the Kash interpreter and return the output as a string.

INPUT:
    s -- string containing Kash code.
    newlines -- bool (default: True); if False, remove all
              backslash-newlines inserted by the Kash output formatter.

get( self, var)

Get the value of the variable var.

help( self, [name=None])

Return help on KASH commands.

Returns help on all commands with a given name. If name is None, return the location of the installed Kash html documentation.

sage: X = kash.help('IntegerRing')   # needs optional kash package

There is one entry in X for each item found in the documentation for this function: If you type print X[0] you will get help on about the first one, printed nicely to the screen.

Author: Sebastion Pauli (2006-02-04) - during SAGE coding sprint

set( self, var, value)

Set the variable var to the given value.

Special Functions: __reduce__,$  $ _assign_symbol,$  $ _contains,$  $ _continuation_prompt,$  $ _doc,$  $ _equality_symbol,$  $ _eval_line,$  $ _eval_line_using_file,$  $ _false_symbol,$  $ _is_true_string,$  $ _next_var_name,$  $ _object_class,$  $ _quit_string,$  $ _start,$  $ _true_symbol

Class: KashDocumentation

class KashDocumentation

Special Functions: __repr__

Class: KashElement

class KashElement

Special Functions: __len__,$  $ __mod__

See About this document... for information on suggesting changes.