Documentation for Module: std.py ||  Module Index

General: !Overview Standard user library...
author: Tim Johnson tim@akwebsoft.com

Global Index
add first,second,third,fourth,fifth,sixth,seventh,eighth,ninth,tenth is_int_str not_empty sort_dict
AllFound first_word is_list now split_dict
between flatten is_nested_list no_data split_first
bld_lsts float_format is_series on_mouse_out sql2std
capitalize flts2int is_sql_date_time on_mouse_over sqr
cd get_val is_string parse_int sqr_root
cgi_header halt is_tail parse_ints string2dict
chomp has_data is_type parts string2file
column_data has_data is_uinteger pdf_header stripTags
compare_as_floats has_keys js_redirect peek strip_brs
compare_as_ints has_no_data last pop_any strip_tags
compress_file Here limit_words pop_dict str_replace
compress_file hostname list2dict pwd str_round
compress_files incs ljust_list randomize touch
console_halt index load_obj random_string ToZip
curyear indexes local_time read_all to_columns
decompress_file init_list lop_after read_lines to_dec
Dict2Json init_tuple lop_at recursePrintDict to_int
dictFlatValues inline_effects lop_thru RemoveFiles to_matrix
DictReplace inline_style lop_to remove_chars to_md5
dict_to_list insertAfter lowerD replace_at to_nested
dict_values instance ls reverse to_sql_date
div insure_dbl_quote lstrip reverse_dict to_sql_date_time
div_string in_list lstrip_tags rm to_sql_time
dstrip_tags in_range make_block rstrip try_int
ds_dict IsMonthString maxl_list save_obj Type
dump_dict is_decimal merge serve_pdf uname
empty_nums is_dict meta_dict setdefaults unique
even is_empty ml_tag set_decimal_places unpad_if_int
exclude is_float ml_validate set_dict UnZip
exists is_floats mrk set_n upperD
extract is_head mtime set_precision within
file_size is_int nested_list single WriteLines
find_in is_ints nest_list single_space zero_lengths
find_next is_int_series next skip  

Context Index
date_tool Functions: ==>
OVERVIEW mmddyyyy2sql month_days sql_to valid_month
days months sql2mdy to_sql years
is_mysql_format        
slst Functions: ==>
OVERVIEW add __call__    
sdict Functions: ==>
OVERVIEW get items order __getitem__
add item keys values __setitem__
D items      
toggler Functions: ==>
OVERVIEW first next reset T__call__
back last      
setForm Functions: ==>
Null Functions: ==>
OVERVIEW        
Templater Functions: ==>
OVERVIEW        
DisplayDict Functions: ==>
OVERVIEW        
Eval Functions: ==>
OVERVIEW __getitem__      
Evalx Functions: ==>
OVERVIEW __getitem__      
EncodeShellChars Functions: ==>
OVERVIEW escape undisplay unescape __str__
display        
ldict Functions: ==>
OVERVIEW insert values __setitem__ __setitem__
get items      
BitMap Functions: ==>
OVERVIEW set test uset __call__
is_set        
Str Functions: ==>
OVERVIEW div overwrite setform setRadio
change find setChk    

Global function documentation

Function: addTopGlobals IndexContext IndexNext
    syntax: add(<series><val><filter>) If val not in series or not in filt, append val to series.
Function: AllFoundTopGlobals IndexContext IndexBackNext
    syntax: AllFound(<acceptable>,<str>) Are all members of str found in acceptable?
Function: betweenTopGlobals IndexContext IndexBackNext
    syntax: between(<val>,<begin>,<end>) Is <val> between <begin> and <end>?
    #Note <begin> and <end> not matched.
Function: bld_lstsTopGlobals IndexContext IndexBackNext
    syntax: bld_lsts(num) Built and return a list of num lists
Function: capitalizeTopGlobals IndexContext IndexBackNext
    syntax: capitalize(<S>) capitalize every word in a string.
Function: cdTopGlobals IndexContext IndexBackNext
    syntax: cd(<dir>) Change directory to dir
Function: cgi_headerTopGlobals IndexContext IndexBackNext
    syntax: cgi_header() Write a simple CGI mime-type header.
Function: chompTopGlobals IndexContext IndexBackNext
    syntax: chomp(<series>,<X>)
    If: <x> is numeric, removes <x> number of characters from end of <series>
    If: <x> is a string, removes <x> from end of <series> (if found)
Function: column_dataTopGlobals IndexContext IndexBackNext
    syntax: column_data(<s>)
    Description: If s = None or trim(s) = or s has either 0s or decimals is false
Function: compare_as_floatsTopGlobals IndexContext IndexBackNext
    syntax: compare_as_floats(<a>,<b>)
    Description: Compare two values, coercing both to floats. Example 300 = 300.00
Function: compare_as_intsTopGlobals IndexContext IndexBackNext
    syntax: compare_as_ints(<a>,<b>)
    Description: Compare two values, coercing both to integers. Example 020 = 20
Function: compress_fileTopGlobals IndexContext IndexBackNext
    syntax: compress_file(<file>) Compress a single file using gzip.
    syntax: compress_file(<file>) Uncompress a single file using gzip.
Function: compress_fileTopGlobals IndexContext IndexBackNext
    syntax: compress_file(<file>) Compress a single file using gzip.
    syntax: compress_file(<file>) Uncompress a single file using gzip.
Function: compress_filesTopGlobals IndexContext IndexBackNext
    syntax: compress_files(<files>) Zip a series of files
Function: console_haltTopGlobals IndexContext IndexBackNext
    syntax: console_halt(<message=''>)
    Description: Intentional halt of system with informational error message raised.
Function: curyearTopGlobals IndexContext IndexBackNext
    syntax: curyear() Return the current year.
Function: decompress_fileTopGlobals IndexContext IndexBackNext
    syntax: decompress_file(<files>) Unzip a series of files
Function: Dict2JsonTopGlobals IndexContext IndexBackNext
    syntax: Dict2Json(<D>) Input dictionary. Output string representation of JSON structure.
Function: dictFlatValuesTopGlobals IndexContext IndexBack,)">Next
    syntax: dictFlatValues(<dict>) Returns flattened list of values
Function: DictReplaceTopGlobals IndexContext IndexBackNext
    syntax: DictReplace(<S>,<D>,<begin="[[">,<end="]]">)
    Description: Replace all tokens in S composed from
    1: begin 2: a key from D 3: and end
    with: the value retrieved by D[key]
Function: dict_to_listTopGlobals IndexContext Index,)">BackNext
    syntax: dict_to_list(<D>) Convert a dictionary to a list
Function: dict_valuesTopGlobals IndexContext IndexBackNext
    syntax: dict_values(<dictionary><list-of-keys>)
    from: dictionary return list of values for <list-of-keys> as a tuple
Function: divTopGlobals IndexContext IndexBackNext
    syntax: div(<dividend>,<divisor>) Return quotient and remainder
Function: div_stringTopGlobals IndexContext IndexBackNext
    syntax: div_string(<str>,<num>,<strict=None>)
    description: Divide string or series into number of subsections.
    If: <strict> Throw error if length of string not evenly divisible
    Else: Remainder of elements are ignored
Function: dstrip_tagsTopGlobals IndexContext IndexBackNext
    syntax: dstrip_tags(<D>,<exceptions=[]>)
    Description: Remove tags from string values in a dictionary. Overlook any in exceptions
Function: ds_dictTopGlobals IndexContext IndexBackNext
    syntax: ds_dict(<dict><dst-any><k1><k2>)
    description: Merge values associated with keys k1' and k2' into a new (or reset pair)
    Result: a dictionary with display' and store' keys
Function: dump_dictTopGlobals IndexContext IndexBackNext
    syntax: dump_dict(<dict>) sort and write out items in an HTML format.
Function: empty_numsTopGlobals IndexContext IndexBackNext
    syntax: empty_nums(<v>) If v has only 0 or ., return empty string.
Function: evenTopGlobals IndexContext IndexBackNext
    syntax: even(<val>,<divisor>) Test for even divisibility
Function: excludeTopGlobals IndexContext IndexBackNext
    syntax: exclude(<seq1>,<seq2>) Return items in seq2 not in seq1
Function: existsTopGlobals IndexContext IndexBackNext
    syntax: exists(<path>) Does path (or file) exist?
Function: extractTopGlobals IndexContext IndexBackNext
    syntax: extract(<oldlist>,<spacing>,<ndx=-1>)
    Description: Construct a new list from oldlist choosing items on interval of spacing
    Example:: extract([1,2,3,4,5,6,7,8,9,0] 2) = [1,3,5,7,9]
    If: ndx > -1, choose only item[ndx] (items must be series)
    Example:: extract(['one','two','three','four',2,2) = ['e', r]
Function: file_sizeTopGlobals IndexContext IndexBackNext
    syntax: file_size(<str-vile>) Get the size of a file.
Function: find_inTopGlobals IndexContext IndexBackNext
    syntax: find_in(<items>,<sub>,<nc=0>,<head=0>,<exact=0>,<reverse=0>)
    description: Find sub(string) in items(list).
    Keywords: <nc>: ignorecase, <head>: match sub to head of list item.
    Keywords: <exact>: sub must == item
    Keyword: <reverse>: match list item to sub, instead of sub to list item
Function: find_nextTopGlobals IndexContext IndexBackNext
    syntax: find_next(<lst>,<val>) Find the item following val in lst
    description: L must be a list or tuple. Like the REBOL select function
Function: first,second,third,fourth,fifth,sixth,seventh,eighth,ninth,tenthTopGlobals IndexContext IndexBackNext
    syntax: first,second,third,fourth,fifth,sixth,seventh,eighth,ninth,tenth
    Description: Reference x by ordinal as in first(0)
Function: first_wordTopGlobals IndexContext IndexBackNext
    syntax: first_word(<str>) Return first word of sentence. First substring delimited by
Function: flattenTopGlobals IndexContext IndexBackNext
    syntax: flatten(lst) [[1,2],[3,4]] => [1,2,3,4]
Function: float_formatTopGlobals IndexContext IndexBackNext
    syntax: float_format(<F>) Returns digits to Left and Right of decimal point.
Function: flts2intTopGlobals IndexContext IndexBackNext
    syntax: flts2int(<val>,<pre=None>)
    Description: Takes a value that can be converted to a float, creates the float,
    and returns a rounded integer with optional precision pre
Function: get_valTopGlobals IndexContext IndexBackNext
    syntax: get_val(<D>,<key>,<default=None>) Get a value for D[k], or default.
Function: haltTopGlobals IndexContext IndexBackNext
    syntax: halt(<message=''>) Stop process with HTML markup.
    Description: Intentional halt of system with informational error message raised.
Function: has_dataTopGlobals IndexContext IndexBackNext
    syntax: has_data(<item>) Does <item> contain data? has_data(0) returns 1
Function: has_dataTopGlobals IndexContext IndexBackNext
    syntax: has_data(<v>) negative of has_data
Function: has_keysTopGlobals IndexContext IndexBackNext
    syntax: has_keys(<D>,<keys>) Does D have all of a series of keys?
Function: has_no_dataTopGlobals IndexContext IndexBackNext
    syntax: has_no_data(<s>) If s = None or trim(s) = or s has either 0s or decimals
Function: HereTopGlobals IndexContext IndexBackNext
    syntax: Here() Return file, name and line number of calling function
Function: hostnameTopGlobals IndexContext IndexBackNext
    syntax: hostname() Get host name.
Function: incsTopGlobals IndexContext IndexBackNext
    syntax: incs(<L>,<Interval>) Process list by incrementing reference to head of list by interval
    Note: Not implemented.
Function: indexTopGlobals IndexContext IndexBackNext
    syntax: index(<L>,<interval=1>) return list of indexes of L, seperated by interval
Function: indexesTopGlobals IndexContext IndexBackNext
    syntax: indexes(<lst>,<val>) Return list of matches for val in lst
Function: init_listTopGlobals IndexContext IndexBackNext
    syntax: init_list(<val>,<num>) Create a list with num members of value val
Function: init_tupleTopGlobals IndexContext IndexBackNext
    syntax: init_tuple(<val>,<num>) Create a tuple with num members of value val
Function: inline_effectsTopGlobals IndexContext IndexBackNext
    syntax: inline_effects(<bg>,<txt>,<hbg>,<htxt>,<wt>,<sz>)
    Description: Create inline text and hover effects for a widget
    syntax: [create_input_item(<_type>,<visual>,<others>)]
    Description: Create an html input item. visual: visual effects used by inline_effects().
    others: other effects as provided
    visual: {'bg':'#E8E8E8','txt':'#000000','hbg':'','htxt':'', sz:'11px','wt':'normal'}
Function: inline_styleTopGlobals IndexContext IndexBackNext
    syntax: inline_style(D) create inline style attributes from Dict with
    Following: keys: "bg", "txt","wt", "sz"
Function: insertAfterTopGlobals IndexContext IndexBackNext
    syntax: insertAfter(<lst>,<old>,<new>) Insert new into lst after old
Function: instanceTopGlobals IndexContext IndexBackNext
    syntax: instance(<v>) Is <v> and instance?
Function: insure_dbl_quoteTopGlobals IndexContext IndexBackNext
    syntax: insure_dbl_quote(<str>) Insure that a string begins and ends with double quotes.
Function: in_listTopGlobals IndexContext IndexBackNext
    syntax: in_list(<lst>,<str>)
    Return: index of match for str in lst, or -1
Function: in_rangeTopGlobals IndexContext IndexBackNext
    syntax: in_range(<value>,<lower>,<upper>)
    description: Is value included in the range of lower and upper.
    Note: Differs from between because lower and upper with be matched.
Function: IsMonthStringTopGlobals IndexContext IndexBackNext
    syntax: IsMonthString(<str>) Does <str> represent a numeric month?
Function: is_decimalTopGlobals IndexContext IndexBackNext
    syntax: is_decimal(<str>,<pre=None>) Can str be converted to a decimal.
    If: pre test to see if potential precision of str is equal to pre
Function: is_dictTopGlobals IndexContext IndexBackNext
    syntax: is_dict(<D>) Is D a dictionary?
Function: is_emptyTopGlobals IndexContext IndexBackNext
    syntax: is_empty(<s>,<m=none>) Is s an empty series? OR
    If: m and s is a string, first trim s before testing
    Example:: is_empty(' ) == false, is_empty(' ,1) == true.
Function: is_floatTopGlobals IndexContext IndexBackNext
    syntax: is_float(<v>) Is v a float?
Function: is_floatsTopGlobals IndexContext IndexBackNext
    syntax: is_floats(<val>) Can val be converted into a float value?
Function: is_headTopGlobals IndexContext IndexBackNext
    syntax: is_head(<str>,<sub>,<reverse=0>) Is sub found at the head of Str?
    OR: if reverse is Str found at the head of sub?
Function: is_intTopGlobals IndexContext IndexBackNext
    syntax: is_int(<v>) Is v an integer?
Function: is_intsTopGlobals IndexContext IndexBackNext
    syntax: is_ints(<val>) Can val be converted into an integer value?
Function: is_int_seriesTopGlobals IndexContext IndexBackNext
    syntax: is_int_series(<val>) Can every item in val be converted to an integer?
Function: is_int_strTopGlobals IndexContext IndexBackNext
    syntax: is_int_str(<str>) Is <str> a number or can it be converted to a number?
Function: is_listTopGlobals IndexContext IndexBackNext
    syntax: is_list(<l>) Is l a list?
Function: is_nested_listTopGlobals IndexContext IndexBackNext
    syntax: is_nested_list(<V>) Is V a list composed ENTIRELY of lists?
Function: is_seriesTopGlobals IndexContext IndexBackNext
    syntax: is_series(<l>) Is l a list OR a tuple?
Function: is_sql_date_timeTopGlobals IndexContext IndexBackNext
    syntax: is_sql_date_time(<val>) Is valid SQL date and time format?
Function: is_stringTopGlobals IndexContext IndexBackNext
    syntax: is_string(<s>) Is s a string?
Function: is_tailTopGlobals IndexContext IndexBackNext
    syntax: is_tail(<str>,<sub>) Does <sub> match the end of <str>?
Function: is_typeTopGlobals IndexContext IndexBackNext
    syntax: is_type(<t>) Is t a tuple?
Function: is_uintegerTopGlobals IndexContext IndexBackNext
    syntax: is_uinteger(<str>) Can <str> be converted to an <unsigned> integer?
Function: js_redirectTopGlobals IndexContext IndexBackNext
    syntax: js_redirect(S,emit=None) Compose a javascript redirection.
Function: lastTopGlobals IndexContext IndexBackNext
    syntax: last(<x>) last item of <x>
Function: limit_wordsTopGlobals IndexContext IndexBackNext
    syntax: limit_words(<str>,<limit>) Truncate <str> to <limit> numer of words
Function: list2dictTopGlobals IndexContext IndexBackNext
    syntax: list2dict(<L>,<keys='__keys__'>,<subset=None>,<tolower=None>)
    From: list L create a dictionary with key/value pairs from alternating items in L.
    Also: create a __keys__ key with value equal to a list of keys from L in the original order.
    Example:: list2dict([1,2,3,4,5,6,7,8]) = {'__keys__': [1, 3, 5, 7], 1: 2, 3: 4, 5: 6, 7: 8}
    arg: keys may be give a different name (key).
    arg: subset will be expected to be another dictionary
Function: ljust_listTopGlobals IndexContext IndexBackNext
    syntax: ljust_list(<lst><opt-char><opt-extra>)
    description: Returns a list with all string members of l left justifed and same length with padded spaces
Function: load_objTopGlobals IndexContext IndexBackNext
    syntax: load_obj(f) load an object from a file, returns object
Function: local_timeTopGlobals IndexContext IndexBackNext
    syntax: local_time()
    Return: month,day,year _ hour, minute and second as a string
    _ between year and hour insures string without spaces.
Function: lop_afterTopGlobals IndexContext IndexBackNext
    syntax: lop_after(<src>,<target>) If target found, delete copy of src
    After: the location of target Example:: lop_after(<testhis>,<th>) => testh
Function: lop_atTopGlobals IndexContext IndexBackNext
    syntax: lop_at(<src>,<target>) If target found, delete copy of src
    From: the location of target Example:: lop_at(<testhis>,<th>) => tes
Function: lop_thruTopGlobals IndexContext IndexBackNext
    syntax: lop_thru(<src>,<target>) If target found, delete copy of src
    Thru: the location of target Example:: lop_thru(<testhis>,<th>) => is
Function: lop_toTopGlobals IndexContext IndexBackNext
    syntax: lop_to(<src>,<target>) If <target> is found, delete copy of <src>
    To: the location of <target> Example:: lop_to(<testhis>,<th>) = <this>
Function: lowerDTopGlobals IndexContext IndexBackNext
    syntax: lowerD(<dict>) Convert all string keys of dict D' to lowercase.
Function: lsTopGlobals IndexContext IndexBackNext
    syntax: ls(<filter=None>) Get directory listing.
    Note: filter must start with one of ^, $, *
Function: lstripTopGlobals IndexContext IndexBackNext
    syntax: lstrip(<str><chars><opt-IC>)
    description: If found, strip substring chars from start of s. If IC ignore case.
Function: lstrip_tagsTopGlobals IndexContext IndexBackNext
    syntax: lstrip_tags(<str>,<tag=''>) Remove any tags from a string.
    Return: Last tag found and reconstructed string.
Function: make_blockTopGlobals IndexContext IndexBackNext
    syntax: make_block(X) Insure that if X is a string, it is composed into a block
Function: maxl_listTopGlobals IndexContext IndexBackNext
    syntax: maxl_list(<lst>) Return length of longest item in l. TypeError is ignored
Function: mergeTopGlobals IndexContext IndexBackNext
    syntax: merge(Ddst,Dsrc,dups_ok=1,dups_allowed=None) Update one dictionary from another.
    Notes: If dups_ok ignore duplicates, else pass dups_allowed to selectively allow duplicates
Function: meta_dictTopGlobals IndexContext IndexBackNext
    syntax: meta_dict(<seq>,<key>)
    Description: Takes a sequence of dictionaries and returns a single dictionary
    where values are the original dictionaries. Each key is a value retrieved from
    each original dictionary by argument key. key must be common to all dictionaries.
Function: ml_tagTopGlobals IndexContext IndexBackNext
    syntax: ml_tag(<name>,<text>,<acceptables>,<**kw>)
    Description: Create a tag with name, and test with attributes from **kw
    and validated by acceptables. Provides closing tag. Returns: string
Function: ml_validateTopGlobals IndexContext IndexBackNext
    syntax: ml_validate(<name>,<acceptables>,<kw>)
    Description: Where name is variable name for kw and acceptables list of
    keywords, iterate thru kw keywords and throw error in not keyword not acceptable.
Function: mrkTopGlobals IndexContext IndexBackNext
    syntax: mrk(<token=''>,<br=0>) Debugging stub with optional text
Function: mtimeTopGlobals IndexContext IndexBackNext
    syntax: mtime(<path>) Get mtime of path.
Function: nested_listTopGlobals IndexContext IndexBackNext
    syntax: nested_list(<num>) Create a nested list with empty members.
    example: nested_list(3) => [[][][]]
Function: nest_listTopGlobals IndexContext IndexBackNext
    syntax: nest_list(<lst>,<num>)
    From: a one-dimensional list, return a two dimensional list with num per row
Function: nextTopGlobals IndexContext IndexBackNext
    syntax: next(<x>) All but the first item of <x>
Function: not_emptyTopGlobals IndexContext IndexBackNext
    syntax: not_empty() NEGATE of is_empty()
Function: nowTopGlobals IndexContext IndexBackNext
    syntax: now(<date-or-None>)
    description: If date is None Return current date and time. YYYY-MM-DD HH:MM:SS' format
Function: no_dataTopGlobals IndexContext IndexBackNext
    syntax: no_data(<item>) Evaluates to true if <item> has NO data. no_data(0) is false.
Function: on_mouse_outTopGlobals IndexContext IndexBackNext
    syntax: on_mouse_out(<D>) Return an omMouseout script. <bg> <txt>
Function: on_mouse_overTopGlobals IndexContext IndexBackNext
    syntax: on_mouse_over(<D>) Return an omMouseover script. <hbg> <htxt>
Function: parse_intTopGlobals IndexContext IndexBackNext
    syntax: parse_int(<str>) Find the first integer in a string
Function: parse_intsTopGlobals IndexContext IndexBackNext
    syntax: parse_ints(<str>) Parse all numeric values in a string
    Return: list of integers.
Function: partsTopGlobals IndexContext IndexBackNext
    syntax: parts(<L>,<interval>) Process list in parts. Not yet implemented.
Function: pdf_headerTopGlobals IndexContext IndexBackNext
    syntax: pdf_header(<file_name>,<length>) Serve a PDF document via CGI with content length.
Function: peekTopGlobals IndexContext IndexBackNext
    syntax: peek(<series>,<start>,<amount>)
    #returns Slice of series of length <amount> beginning at <start>
Function: pop_anyTopGlobals IndexContext IndexBackNext
    syntax: pop_any(<dict><*keys>) Pop any number of keys from D'. Ignore those not present
Function: pop_dictTopGlobals IndexContext IndexBackNext
    syntax: pop_dict(<D>,<key>) Remove key pair from D and return the value for key
Function: pwdTopGlobals IndexContext IndexBackNext
    syntax: pwd() Get the current working directory as in unix pwd
Function: randomizeTopGlobals IndexContext IndexBackNext
    syntax: randomize(<exp>) Return random integer between 0 and 10 to exp power.
Function: random_stringTopGlobals IndexContext IndexBackNext
    syntax: random_string(length,md5=0,s='')
    description: Generate a random string of length length. if not s, use default.
Function: read_allTopGlobals IndexContext IndexBackNext
    syntax: read_all(<file_name>,<path=None>) Read a file as a string. Does not check for existence.
Function: read_linesTopGlobals IndexContext IndexBackNext
    syntax: read_lines(<file_name>)
    Description: Get list lines read from file_name. Newlines stripped.
Function: recursePrintDictTopGlobals IndexContext IndexBackNext
    syntax: recursePrintDict(<dict><int-level><opt-bool-iscgi>)
    description: Recursevly pretty-print a dictionary
Function: RemoveFilesTopGlobals IndexContext IndexBackNext
    syntax: RemoveFiles(<files>,<dir=None>) Delete a list of files
Function: remove_charsTopGlobals IndexContext IndexBackNext
    syntax: remove_chars(<S>,<chars>) Return all of chars removed from S
Function: replace_atTopGlobals IndexContext IndexBackNext
    syntax: replace_at(<S>,<old>,<new>,<which>)
    Returns S replaced at which with new if old is found
Function: reverseTopGlobals IndexContext IndexBackNext
    syntax: reverse(<str>) Reverse a string.
Function: reverse_dictTopGlobals IndexContext IndexBackNext
    syntax: reverse_dict(<D>) Values become keys and keys become values.
Function: rmTopGlobals IndexContext IndexBackNext
    syntax: rm(<path>) Remove a path (or file)
Function: rstripTopGlobals IndexContext IndexBackNext
    syntax: rstrip(<str><chars><opt-IC>)
    description: If found, strip substring chars from end of s. If IC ignore case.
Function: save_objTopGlobals IndexContext IndexBackNext
    syntax: save_obj(<object>,<file>) Save object to file. Uses cPicle
Function: serve_pdfTopGlobals IndexContext IndexBackNext
    syntax: serve_pdf(<file_name>,<pdf_content>) Serve a PDF document via CGI.
Function: setdefaultsTopGlobals IndexContext IndexBackNext
    syntax: setdefaults(D,defaults) Set a series of defaults to a Dictionary
Function: set_decimal_placesTopGlobals IndexContext IndexBackNext
    syntax: set_decimal_places(<val>,<precision>)
    Description: For a string representation of a decimal (floating point) value.
Function: set_dictTopGlobals IndexContext IndexBackNext
    syntax: set_dict(<dict><key><val>) Set dict value if key is non-existant
Function: set_nTopGlobals IndexContext IndexBackNext
    syntax: set_n(<series>,<n>,<v>) Set series[<n>] to <v>
Function: set_precisionTopGlobals IndexContext IndexBackNext
    syntax: set_precision(<val>,<LP>,<RP>)
    Description: format decimal places before and after decimal point
Function: singleTopGlobals IndexContext IndexBackNext
    syntax: single(X) Return the length of a series. If not series, return 0.
Function: single_spaceTopGlobals IndexContext IndexBackNext
    syntax: single_space(<S>) Reformat string, removing leading and trailing
    space and leaving no more than one space consecutively in the string
Function: skipTopGlobals IndexContext IndexBackNext
    syntax: skip(<series>,<skipnum>) skip('testthis',4) => this. Idiot proofed.
Function: sort_dictTopGlobals IndexContext IndexBackNext
    syntax: sort_dict(<dict>) sort and return items as nested list
Function: split_dictTopGlobals IndexContext IndexBackNext
    syntax: split_dict(<dict>) Returns a list of single pair dictionaries from dict
Function: split_firstTopGlobals IndexContext IndexBackNext
    syntax: split_first(<str>,<delim=' >)
    Returns: first member of a split where delim defaults to SPACE
Function: sql2stdTopGlobals IndexContext IndexBackNext
    syntax: sql2std(<val>) convert from an sql-style string to month(word)-day-year.
Function: sqrTopGlobals IndexContext IndexBackNext
    syntax: sqr(<num>) Returns the square of a number
Function: sqr_rootTopGlobals IndexContext IndexBackNext
    syntax: sqr_root(<num>) returns integer floor of square root of num AND remainder
Function: string2dictTopGlobals IndexContext IndexBackNext
    syntax: string2dict(<str>,<pairsep>,<keysep>)
    Description: Parse a string on pairsep and keysep
    Returns: Dictionary.
    Example:: string2dict("one:two,three:four",":",",") => {"one":"two","three":"four"}
Function: string2fileTopGlobals IndexContext IndexBackNext
    syntax: string2file(<str>,<filename>) write string to file_name without checking.
Function: stripTagsTopGlobals IndexContext IndexBackNext
    syntax: stripTags(<label>,<replacement='')
    Description: Return copy of label with any tags removed or replaced.
    Note: Preferable to strip_tags
Function: strip_brsTopGlobals IndexContext IndexBackNext
    syntax: strip_brs(<label>) Remove any break tags from a string.
Function: strip_tagsTopGlobals IndexContext IndexBackNext
    syntax: strip_tags(<label>,<replacement='')
    Description: Return copy of label with any tags removed or replaced.
Function: str_replaceTopGlobals IndexContext IndexBackNext
    syntax: str_replace(<str>,<D-unwanted>)
    Return: str with any key from <unwanted> found in <str> with key value.
Function: str_roundTopGlobals IndexContext IndexBackNext
    syntax: str_round(<val>,<pre>,<ndx=None>) Converts string to rounded integer.
Function: touchTopGlobals IndexContext IndexBackNext
    syntax: touch(<f>) Touch a file
Function: ToZipTopGlobals IndexContext IndexBackNext
    syntax: ToZip(<files>,<zip_file>,<dir=None>) ZIP a file and add to archive
Function: to_columnsTopGlobals IndexContext IndexBackNext
    syntax: to_columns(<lst>,<cols>)
    Description: From a list, return nested list so that iteration displays on columns
Function: to_decTopGlobals IndexContext IndexBackNext
    syntax: to_dec(<any>) Attempt to convert a string with commas to a decimal/float.
Function: to_intTopGlobals IndexContext IndexBackNext
    syntax: to_int(<any>) Attempt to convert a string with commas to an integer.
Function: to_matrixTopGlobals IndexContext IndexBackNext
    syntax: to_matrix(<lst>,<cols>)
    description: Creates matrix for sorting a one-dimension list on columns.
    Returns: Nested list of indexes.
Function: to_md5TopGlobals IndexContext IndexBackNext
    syntax: to_md5(<str>) Return an md5 encrypted string
    Note: Encryption enhanced by time/date stamp and random number
    See: http://effbot.org/librarybook/md5.htm for examples
Function: to_nestedTopGlobals IndexContext IndexBackNext
    syntax: to_nested(<L>,<cols>) Creates matrix to sort a one-dimensional list on rows.
    Return: indexes only
Function: to_sql_dateTopGlobals IndexContext IndexBackNext
    syntax: to_sql_date(<val>,<sep='/'>) From mm/dd/yyyy format returns SQL format
Function: to_sql_date_timeTopGlobals IndexContext IndexBackNext
    syntax: to_sql_date_time(<val>)
    Description: From a common date time like 09/27/2004 0:00:00 or 2000-01-07 00:00:00
    Return: sql long datetime format
Function: to_sql_timeTopGlobals IndexContext IndexBackNext
    syntax: to_sql_time(<val>,<sep>) Returns SQL time format from common time format
Function: try_intTopGlobals IndexContext IndexBackNext
    syntax: try_int(<str>) Attempt to convert a value to an integer. If fail, return original
Function: TypeTopGlobals IndexContext IndexBackNext
    syntax: Type(<v>) Return a more readable type() function if in HTML environment.
Function: unameTopGlobals IndexContext IndexBackNext
    syntax: uname(<switch>) Run uname shell command with switch
Function: uniqueTopGlobals IndexContext IndexBackNext
    syntax: unique(<lst-tuple>) From list or tuple s return list of unique values.
Function: unpad_if_intTopGlobals IndexContext IndexBackNext
    syntax: unpad_if_int(<str>) Remove leading zeroes in S can be converted to int
Function: UnZipTopGlobals IndexContext IndexBackNext
    syntax: UnZip(zip_file) UNZIP an archive
Function: upperDTopGlobals IndexContext IndexBackNext
    syntax: upperD(<dict>) Convert all string keys of dict D' to uppercase.
Function: withinTopGlobals IndexContext IndexBackNext
    syntax: within(<x>,<y>,<z>) Is y between x and z or equal to either?
Function: WriteLinesTopGlobals IndexContext IndexBackNext
    syntax: WriteLines(<lines>,<file>) Write lines to file (name)
Function: zero_lengthsTopGlobals IndexContext IndexBack
    syntax: zero_lengths(<N>) Return a list of N zeroes.

Global function documentation

Context: BitMap

Overview Of: BitMapTopContext IndexGlobals IndexNext Function Next Context
    syntax: Bitwise Mapping and setting
    Initialize: explicitly as integer or implicitly as list of bits to set.
    Note: Limit bytes to 4 and suppress operations on bit 31
Function: obj.is_setTopContext IndexGlobals IndexPrevious FunctionNext Function Next Context
    syntax: obj.is_set(<n>) Is bit n on val set(1) or unset(0)?
Function: obj.setTopContext IndexGlobals IndexPrevious FunctionNext Function Next Context
    syntax: obj.set(<*bits>) Set any number of bits.
Function: obj.testTopContext IndexGlobals IndexPrevious FunctionNext Function Next Context
    syntax: obj.test(<n>) Get value of bit n
Function: obj.usetTopContext IndexGlobals IndexPrevious FunctionNext Function Next Context
    syntax: obj.uset(<n>) Unset bit n
Function: obj.__call__TopContext IndexGlobals IndexPrevious FunctionNext Context
    syntax: obj.__call__() Return value
    Example: obj() Return value
    syntax: [obj.__str__()] String representation of bits in "0101..." format
    Example: print(obj) String representation of bits in "0101..." format

Context: date_tool

Overview Of: date_toolTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    General: Date Handling Tools
Function: obj.daysTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.days() Return list of days of months
Function: obj.is_mysql_formatTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.is_mysql_format(<str>)
    description: Make a reasonable test to confirm that S is in a sql format
Function: obj.mmddyyyy2sqlTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.mmddyyyy2sql(<str-dt>,(str-sep=none>)
    description: Convert mmddyyyy string to a MySQL string
    syntax: [obj.today()] Return current date in Y-M-D format.
Function: obj.monthsTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.months(<full=0>) Get a list of months. if full, return full names,
    else: return abbreviations
Function: obj.month_daysTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.month_days() Return list of days of months
Function: obj.sql2mdyTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.sql2mdy(<dstr>,<parts=0>,<full=0>,<noraise=0>
    description: Convert from MySQL format to <mm/dd/yy> format
Function: obj.sql_toTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.sql_to(<dstr>,<parts=0>,<full=0>,<noraise=0>)
    description: Convert from MySQL format to text format
Function: obj.to_sqlTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.to_sql(<month>,<day>,<year>) Convert month, day, and year to MySQL format
Function: obj.valid_monthTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.valid_month(<str-m>) Is month a valid full name or abbreviation?
Function: obj.yearsTopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    syntax: obj.years(<begin=0>,<end=0>) Return internal list of years,
    description: create a new list of years from begin and end arguments

Context: DisplayDict

Overview Of: DisplayDictTopContext IndexGlobals IndexPrevious ContextNext Context
    General: Display Dictionary values as function calls. Useful inside of Eval()

Context: EncodeShellChars

Overview Of: EncodeShellCharsTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    syntax: encode/decode shell characters in two modes:
    1: HTML character entities - for display in html content.
    2: Simple backslash escaping - for storage in HTML hidden fields.
    Default: is to remove any html/xml tags
    Usage: dictionaries used for lookup which are created at instantiation.
Function: obj.displayTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.display(<str>) Substitute any unsafe chars with HTML character entity
Function: obj.escapeTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.escape(<str>) Substitute any unsafe chars with backslashes
Function: obj.undisplayTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.undisplay(<str>)
    Description: Substitute any HTML character entities with corresponding character
Function: obj.unescapeTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.unescape(<str>) Substitute any escaped character pairs with original character
Function: obj.__str__TopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    syntax: obj.__str__() Return lookup structures
    Example: print(Obj)

Context: Eval

Overview Of: EvalTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    syntax: Evaluate a string with named values.
    Initialize: with optional globels and locals
Function: obj.__getitem__TopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    Override: D.__getitem__(<key>)
    Syntax: res = D["key"]

Context: Evalx

Overview Of: EvalxTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    syntax: Evaluate a string with named values globally
    Initialize: with optional globals and locals
Function: obj.__getitem__TopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    Override: D.__getitem__(<key>) [] override.
    Syntax: res = D["key"]

Context: ldict

Overview Of: ldictTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    General: Expanded dictionary functionality.
    Usage: Keys retrieved in same order as entered.
    Retrieval: multiple values can be accessed
Function: obj.getTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.get(<*keys>) Return a list of values for a list of keys.
Function: obj.insertTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.insert(<oldkey>,<newkey>,<val>) Insert newkey into obj.kys after oldkey
Function: obj.itemsTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.items() Return all pairs in order of addition.
Function: obj.valuesTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.values() Return all values in order.
Function: obj.__setitem__TopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    Override: D.__setitem__(<key>,<value>)
    Description: Set an item and append to __keys__ if not found there.
    Syntax: D["key"] = value'
    Override: D.__setitem__(<key>,<value>)
    Syntax: D["key"] = value'
Function: obj.__setitem__TopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    Override: D.__setitem__(<key>,<value>)
    Description: Set an item and append to __keys__ if not found there.
    Syntax: D["key"] = value'
    Override: D.__setitem__(<key>,<value>)
    Syntax: D["key"] = value'

Context: Null

Overview Of: NullTopContext IndexGlobals IndexPrevious ContextNext Context
    General: Handle null values
    Description: Null objects always and reliably do nothing.'

Context: sdict

Overview Of: sdictTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    General: Dictionary with a sorted list of keys. Initialize from list
Function: obj.addTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.add(<message>) Add a message
Function: obj.DTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D(<opt-keys>) If keys Return any number of values for keys
    Else: Return all keys
Function: obj.getTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.get(<key>) dict.get()
Function: obj.itemTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.item(<key>) Return key and value
Function: obj.itemsTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.items() Return the ordered key/value pairs, ignoring the __keys__ key.
Function: obj.itemsTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.items(<D-keys>) If keys returns selective list of key/value pairs.
    Else: Return all items
Function: obj.keysTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.keys Return ordered keys ignoring __keys__
Function: obj.orderTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.order() Get sorted list of keys and values.
Function: obj.valuesTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: D.values() Return all ordered values, ignoring __keys__
Function: obj.__getitem__TopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    Override: D.__getitem__(<key>) Return value for key or default
    Syntax: res = D["key"]
Function: obj.__setitem__TopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    Override: D.__setitem__(<key>,<value>) Set an item ONLY if it does not exist.
    Syntax: D["key"] = value

Context: setForm

Context: slst

Overview Of: slstTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    General: Addable and joinable mutable strings. Stored as list
Function: obj.addTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: obj.add(<val>) Add a value.
Function: obj.__call__TopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    syntax: obj.__call__(<sep=None>) Concatenate with or sep. If sep is int, return list
    example: obj(<sep>)

Context: Str

Overview Of: StrTopContext IndexGlobals IndexNext Function Previous ContextNext Context
    General: Enhanced string methods
    Methods:: find, change, setRadio, setChk,setForm,overwrite,div
Function: obj.changeTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: s.change(<old>,<new>)
Function: obj.divTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: s.div(<ID>,<repl>) Replace text within a div tag.
Function: obj.findTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: s.find(<target>,<start=0>)
Function: obj.overwriteTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: s.overwrite(<start>,<stop>,<repl>)
    Description: Replace text beginning at [start] ending at [stop]
Function: obj.setChkTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: s.setChk(<D>) Set checked in <s> based on finding target with
    format: @%s%s@@: % key,D[key]
Function: obj.setformTopContext IndexGlobals IndexPrevious FunctionNext Function Previous ContextNext Context
    syntax: s.setform(<D>) Set values in <s> based on finding target as in
    name='%s' % key, setting to D[key]
Function: obj.setRadioTopContext IndexGlobals IndexPrevious FunctionPrevious ContextNext Context
    syntax: s.setRadio(<D>) Set checked in <s> based on finding target with
    format: @%s%s@@: % key,D[key]

Context: Templater

Overview Of: TemplaterTopContext IndexGlobals IndexPrevious ContextNext Context
    General: Templating class. Template is a string and can be read from a file.
    Tokens in the __template member take the following form:
    <opentag><func><key>'))s<closetag>, where <opentag> is defaulted to
    <!--|, <closetag> is defaulted to |--> and <key> references
    the rec DisplayDict member. <func> is the func substring used to form the
    leftmost section of a function call embedded as a named-value format specified.
    Example:: <!--|contact_name|--> => %(self.__out__(contact_name'))s
    Usage:: S = std.Templater(rec=rec,doc='mytemplate') => write S.content
    The delim argument will be parsed as a string into opentag % closetag members,
    and will ovewrite any opentage or closetag values passed as arguments.

Context: toggler

Overview Of: togglerTopContext IndexGlobals IndexNext Function Previous Context
    General: Wrap-around list reference.
    Example: Iterating thru [0,1,2,3,4]
    If: if reference is to an index greater than 4, reset reference to 0
Function: obj.backTopContext IndexGlobals IndexPrevious FunctionNext Function Previous Context
    syntax: T.back() If not at head, set reference to previous item,
    Else: reset reference to last item.
    Return: referenced item.
Function: obj.firstTopContext IndexGlobals IndexPrevious FunctionNext Function Previous Context
    syntax: T.first() Return item[0]. Reference unchanged.
Function: obj.lastTopContext IndexGlobals IndexPrevious FunctionNext Function Previous Context
    syntax: T.last() Return last item. Reference unchanged.
Function: obj.nextTopContext IndexGlobals IndexPrevious FunctionNext Function Previous Context
    syntax: T.next() Set reference to next item, if not at end, else reset to [0]
    Return: referenced item
Function: obj.resetTopContext IndexGlobals IndexPrevious FunctionNext Function Previous Context
    syntax: T.reset() Reset to head of list and return first item
Function: obj.T__call__TopContext IndexGlobals IndexPrevious FunctionPrevious Context
    syntax: T__call__() Get the currently referenced item and advance the reference.
    Example: T()