| 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 | ||
| Function: add | Top | Globals Index | Context Index | Next |
|
syntax: add(<series><val><filter>) If val not in series or not in filt, append val to series. |
| Function: AllFound | Top | Globals Index | Context Index | Back | Next |
|
syntax: AllFound(<acceptable>,<str>) Are all members of str found in acceptable? |
| Function: between | Top | Globals Index | Context Index | Back | Next |
|
syntax: between(<val>,<begin>,<end>) Is <val> between <begin> and <end>? #Note <begin> and <end> not matched. |
| Function: bld_lsts | Top | Globals Index | Context Index | Back | Next |
|
syntax: bld_lsts(num) Built and return a list of num lists |
| Function: capitalize | Top | Globals Index | Context Index | Back | Next |
|
syntax: capitalize(<S>) capitalize every word in a string. |
| Function: cd | Top | Globals Index | Context Index | Back | Next |
|
syntax: cd(<dir>) Change directory to dir |
| Function: cgi_header | Top | Globals Index | Context Index | Back | Next |
|
syntax: cgi_header() Write a simple CGI mime-type header. |
| Function: chomp | Top | Globals Index | Context Index | Back | Next |
|
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_data | Top | Globals Index | Context Index | Back | Next |
|
syntax: column_data(<s>) Description: If s = None or trim(s) = or s has either 0s or decimals is false |
| Function: compare_as_floats | Top | Globals Index | Context Index | Back | Next |
|
syntax: compare_as_floats(<a>,<b>) Description: Compare two values, coercing both to floats. Example 300 = 300.00 |
| Function: compare_as_ints | Top | Globals Index | Context Index | Back | Next |
|
syntax: compare_as_ints(<a>,<b>) Description: Compare two values, coercing both to integers. Example 020 = 20 |
| Function: compress_file | Top | Globals Index | Context Index | Back | Next |
|
syntax: compress_file(<file>) Compress a single file using gzip. syntax: compress_file(<file>) Uncompress a single file using gzip. |
| Function: compress_file | Top | Globals Index | Context Index | Back | Next |
|
syntax: compress_file(<file>) Compress a single file using gzip. syntax: compress_file(<file>) Uncompress a single file using gzip. |
| Function: compress_files | Top | Globals Index | Context Index | Back | Next |
|
syntax: compress_files(<files>) Zip a series of files |
| Function: console_halt | Top | Globals Index | Context Index | Back | Next |
|
syntax: console_halt(<message=''>) Description: Intentional halt of system with informational error message raised. |
| Function: curyear | Top | Globals Index | Context Index | Back | Next |
|
syntax: curyear() Return the current year. |
| Function: decompress_file | Top | Globals Index | Context Index | Back | Next |
|
syntax: decompress_file(<files>) Unzip a series of files |
| Function: Dict2Json | Top | Globals Index | Context Index | Back | Next |
|
syntax: Dict2Json(<D>) Input dictionary. Output string representation of JSON structure. |
| Function: dictFlatValues | Top | Globals Index | Context Index | Back | , |
|
syntax: dictFlatValues(<dict>) Returns flattened list of values |
| Function: DictReplace | Top | Globals Index | Context Index | Back | Next |
|
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_list | Top | Globals Index | Context Index | , | Next |
|
syntax: dict_to_list(<D>) Convert a dictionary to a list |
| Function: dict_values | Top | Globals Index | Context Index | Back | Next |
|
syntax: dict_values(<dictionary><list-of-keys>) from: dictionary return list of values for <list-of-keys> as a tuple |
| Function: div | Top | Globals Index | Context Index | Back | Next |
|
syntax: div(<dividend>,<divisor>) Return quotient and remainder |
| Function: div_string | Top | Globals Index | Context Index | Back | Next |
|
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_tags | Top | Globals Index | Context Index | Back | Next |
|
syntax: dstrip_tags(<D>,<exceptions=[]>) Description: Remove tags from string values in a dictionary. Overlook any in exceptions |
| Function: ds_dict | Top | Globals Index | Context Index | Back | Next |
|
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_dict | Top | Globals Index | Context Index | Back | Next |
|
syntax: dump_dict(<dict>) sort and write out items in an HTML format. |
| Function: empty_nums | Top | Globals Index | Context Index | Back | Next |
|
syntax: empty_nums(<v>) If v has only 0 or ., return empty string. |
| Function: even | Top | Globals Index | Context Index | Back | Next |
|
syntax: even(<val>,<divisor>) Test for even divisibility |
| Function: exclude | Top | Globals Index | Context Index | Back | Next |
|
syntax: exclude(<seq1>,<seq2>) Return items in seq2 not in seq1 |
| Function: exists | Top | Globals Index | Context Index | Back | Next |
|
syntax: exists(<path>) Does path (or file) exist? |
| Function: extract | Top | Globals Index | Context Index | Back | Next |
|
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_size | Top | Globals Index | Context Index | Back | Next |
|
syntax: file_size(<str-vile>) Get the size of a file. |
| Function: find_in | Top | Globals Index | Context Index | Back | Next |
|
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_next | Top | Globals Index | Context Index | Back | Next |
|
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,tenth | Top | Globals Index | Context Index | Back | Next |
|
syntax: first,second,third,fourth,fifth,sixth,seventh,eighth,ninth,tenth Description: Reference x by ordinal as in first(0) |
| Function: first_word | Top | Globals Index | Context Index | Back | Next |
|
syntax: first_word(<str>) Return first word of sentence. First substring delimited by |
| Function: flatten | Top | Globals Index | Context Index | Back | Next |
|
syntax: flatten(lst) [[1,2],[3,4]] => [1,2,3,4] |
| Function: float_format | Top | Globals Index | Context Index | Back | Next |
|
syntax: float_format(<F>) Returns digits to Left and Right of decimal point. |
| Function: flts2int | Top | Globals Index | Context Index | Back | Next |
|
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_val | Top | Globals Index | Context Index | Back | Next |
|
syntax: get_val(<D>,<key>,<default=None>) Get a value for D[k], or default. |
| Function: halt | Top | Globals Index | Context Index | Back | Next |
|
syntax: halt(<message=''>) Stop process with HTML markup. Description: Intentional halt of system with informational error message raised. |
| Function: has_data | Top | Globals Index | Context Index | Back | Next |
|
syntax: has_data(<item>) Does <item> contain data? has_data(0) returns 1 |
| Function: has_data | Top | Globals Index | Context Index | Back | Next |
|
syntax: has_data(<v>) negative of has_data |
| Function: has_keys | Top | Globals Index | Context Index | Back | Next |
|
syntax: has_keys(<D>,<keys>) Does D have all of a series of keys? |
| Function: has_no_data | Top | Globals Index | Context Index | Back | Next |
|
syntax: has_no_data(<s>) If s = None or trim(s) = or s has either 0s or decimals |
| Function: Here | Top | Globals Index | Context Index | Back | Next |
|
syntax: Here() Return file, name and line number of calling function |
| Function: hostname | Top | Globals Index | Context Index | Back | Next |
|
syntax: hostname() Get host name. |
| Function: incs | Top | Globals Index | Context Index | Back | Next |
|
syntax: incs(<L>,<Interval>) Process list by incrementing reference to head of list by interval Note: Not implemented. |
| Function: index | Top | Globals Index | Context Index | Back | Next |
|
syntax: index(<L>,<interval=1>) return list of indexes of L, seperated by interval |
| Function: indexes | Top | Globals Index | Context Index | Back | Next |
|
syntax: indexes(<lst>,<val>) Return list of matches for val in lst |
| Function: init_list | Top | Globals Index | Context Index | Back | Next |
|
syntax: init_list(<val>,<num>) Create a list with num members of value val |
| Function: init_tuple | Top | Globals Index | Context Index | Back | Next |
|
syntax: init_tuple(<val>,<num>) Create a tuple with num members of value val |
| Function: inline_effects | Top | Globals Index | Context Index | Back | Next |
|
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_style | Top | Globals Index | Context Index | Back | Next |
|
syntax: inline_style(D) create inline style attributes from Dict with Following: keys: "bg", "txt","wt", "sz" |
| Function: insertAfter | Top | Globals Index | Context Index | Back | Next |
|
syntax: insertAfter(<lst>,<old>,<new>) Insert new into lst after old |
| Function: instance | Top | Globals Index | Context Index | Back | Next |
|
syntax: instance(<v>) Is <v> and instance? |
| Function: insure_dbl_quote | Top | Globals Index | Context Index | Back | Next |
|
syntax: insure_dbl_quote(<str>) Insure that a string begins and ends with double quotes. |
| Function: in_list | Top | Globals Index | Context Index | Back | Next |
|
syntax: in_list(<lst>,<str>) Return: index of match for str in lst, or -1 |
| Function: in_range | Top | Globals Index | Context Index | Back | Next |
|
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: IsMonthString | Top | Globals Index | Context Index | Back | Next |
|
syntax: IsMonthString(<str>) Does <str> represent a numeric month? |
| Function: is_decimal | Top | Globals Index | Context Index | Back | Next |
|
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_dict | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_dict(<D>) Is D a dictionary? |
| Function: is_empty | Top | Globals Index | Context Index | Back | Next |
|
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_float | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_float(<v>) Is v a float? |
| Function: is_floats | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_floats(<val>) Can val be converted into a float value? |
| Function: is_head | Top | Globals Index | Context Index | Back | Next |
|
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_int | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_int(<v>) Is v an integer? |
| Function: is_ints | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_ints(<val>) Can val be converted into an integer value? |
| Function: is_int_series | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_int_series(<val>) Can every item in val be converted to an integer? |
| Function: is_int_str | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_int_str(<str>) Is <str> a number or can it be converted to a number? |
| Function: is_list | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_list(<l>) Is l a list? |
| Function: is_nested_list | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_nested_list(<V>) Is V a list composed ENTIRELY of lists? |
| Function: is_series | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_series(<l>) Is l a list OR a tuple? |
| Function: is_sql_date_time | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_sql_date_time(<val>) Is valid SQL date and time format? |
| Function: is_string | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_string(<s>) Is s a string? |
| Function: is_tail | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_tail(<str>,<sub>) Does <sub> match the end of <str>? |
| Function: is_type | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_type(<t>) Is t a tuple? |
| Function: is_uinteger | Top | Globals Index | Context Index | Back | Next |
|
syntax: is_uinteger(<str>) Can <str> be converted to an <unsigned> integer? |
| Function: js_redirect | Top | Globals Index | Context Index | Back | Next |
|
syntax: js_redirect(S,emit=None) Compose a javascript redirection. |
| Function: last | Top | Globals Index | Context Index | Back | Next |
|
syntax: last(<x>) last item of <x> |
| Function: limit_words | Top | Globals Index | Context Index | Back | Next |
|
syntax: limit_words(<str>,<limit>) Truncate <str> to <limit> numer of words |
| Function: list2dict | Top | Globals Index | Context Index | Back | Next |
|
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_list | Top | Globals Index | Context Index | Back | Next |
|
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_obj | Top | Globals Index | Context Index | Back | Next |
|
syntax: load_obj(f) load an object from a file, returns object |
| Function: local_time | Top | Globals Index | Context Index | Back | Next |
|
syntax: local_time() Return: month,day,year _ hour, minute and second as a string _ between year and hour insures string without spaces. |
| Function: lop_after | Top | Globals Index | Context Index | Back | Next |
|
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_at | Top | Globals Index | Context Index | Back | Next |
|
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_thru | Top | Globals Index | Context Index | Back | Next |
|
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_to | Top | Globals Index | Context Index | Back | Next |
|
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: lowerD | Top | Globals Index | Context Index | Back | Next |
|
syntax: lowerD(<dict>) Convert all string keys of dict D' to lowercase. |
| Function: ls | Top | Globals Index | Context Index | Back | Next |
|
syntax: ls(<filter=None>) Get directory listing. Note: filter must start with one of ^, $, * |
| Function: lstrip | Top | Globals Index | Context Index | Back | Next |
|
syntax: lstrip(<str><chars><opt-IC>) description: If found, strip substring chars from start of s. If IC ignore case. |
| Function: lstrip_tags | Top | Globals Index | Context Index | Back | Next |
|
syntax: lstrip_tags(<str>,<tag=''>) Remove any tags from a string. Return: Last tag found and reconstructed string. |
| Function: make_block | Top | Globals Index | Context Index | Back | Next |
|
syntax: make_block(X) Insure that if X is a string, it is composed into a block |
| Function: maxl_list | Top | Globals Index | Context Index | Back | Next |
|
syntax: maxl_list(<lst>) Return length of longest item in l. TypeError is ignored |
| Function: merge | Top | Globals Index | Context Index | Back | Next |
|
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_dict | Top | Globals Index | Context Index | Back | Next |
|
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_tag | Top | Globals Index | Context Index | Back | Next |
|
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_validate | Top | Globals Index | Context Index | Back | Next |
|
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: mrk | Top | Globals Index | Context Index | Back | Next |
|
syntax: mrk(<token=''>,<br=0>) Debugging stub with optional text |
| Function: mtime | Top | Globals Index | Context Index | Back | Next |
|
syntax: mtime(<path>) Get mtime of path. |
| Function: nested_list | Top | Globals Index | Context Index | Back | Next |
|
syntax: nested_list(<num>) Create a nested list with empty members. example: nested_list(3) => [[][][]] |
| Function: nest_list | Top | Globals Index | Context Index | Back | Next |
|
syntax: nest_list(<lst>,<num>) From: a one-dimensional list, return a two dimensional list with num per row |
| Function: next | Top | Globals Index | Context Index | Back | Next |
|
syntax: next(<x>) All but the first item of <x> |
| Function: not_empty | Top | Globals Index | Context Index | Back | Next |
|
syntax: not_empty() NEGATE of is_empty() |
| Function: now | Top | Globals Index | Context Index | Back | Next |
|
syntax: now(<date-or-None>) description: If date is None Return current date and time. YYYY-MM-DD HH:MM:SS' format |
| Function: no_data | Top | Globals Index | Context Index | Back | Next |
|
syntax: no_data(<item>) Evaluates to true if <item> has NO data. no_data(0) is false. |
| Function: on_mouse_out | Top | Globals Index | Context Index | Back | Next |
|
syntax: on_mouse_out(<D>) Return an omMouseout script. <bg> <txt> |
| Function: on_mouse_over | Top | Globals Index | Context Index | Back | Next |
|
syntax: on_mouse_over(<D>) Return an omMouseover script. <hbg> <htxt> |
| Function: parse_int | Top | Globals Index | Context Index | Back | Next |
|
syntax: parse_int(<str>) Find the first integer in a string |
| Function: parse_ints | Top | Globals Index | Context Index | Back | Next |
|
syntax: parse_ints(<str>) Parse all numeric values in a string Return: list of integers. |
| Function: parts | Top | Globals Index | Context Index | Back | Next |
|
syntax: parts(<L>,<interval>) Process list in parts. Not yet implemented. |
| Function: pdf_header | Top | Globals Index | Context Index | Back | Next |
|
syntax: pdf_header(<file_name>,<length>) Serve a PDF document via CGI with content length. |
| Function: peek | Top | Globals Index | Context Index | Back | Next |
|
syntax: peek(<series>,<start>,<amount>) #returns Slice of series of length <amount> beginning at <start> |
| Function: pop_any | Top | Globals Index | Context Index | Back | Next |
|
syntax: pop_any(<dict><*keys>) Pop any number of keys from D'. Ignore those not present |
| Function: pop_dict | Top | Globals Index | Context Index | Back | Next |
|
syntax: pop_dict(<D>,<key>) Remove key pair from D and return the value for key |
| Function: pwd | Top | Globals Index | Context Index | Back | Next |
|
syntax: pwd() Get the current working directory as in unix pwd |
| Function: randomize | Top | Globals Index | Context Index | Back | Next |
|
syntax: randomize(<exp>) Return random integer between 0 and 10 to exp power. |
| Function: random_string | Top | Globals Index | Context Index | Back | Next |
|
syntax: random_string(length,md5=0,s='') description: Generate a random string of length length. if not s, use default. |
| Function: read_all | Top | Globals Index | Context Index | Back | Next |
|
syntax: read_all(<file_name>,<path=None>) Read a file as a string. Does not check for existence. |
| Function: read_lines | Top | Globals Index | Context Index | Back | Next |
|
syntax: read_lines(<file_name>) Description: Get list lines read from file_name. Newlines stripped. |
| Function: recursePrintDict | Top | Globals Index | Context Index | Back | Next |
|
syntax: recursePrintDict(<dict><int-level><opt-bool-iscgi>) description: Recursevly pretty-print a dictionary |
| Function: RemoveFiles | Top | Globals Index | Context Index | Back | Next |
|
syntax: RemoveFiles(<files>,<dir=None>) Delete a list of files |
| Function: remove_chars | Top | Globals Index | Context Index | Back | Next |
|
syntax: remove_chars(<S>,<chars>) Return all of chars removed from S |
| Function: replace_at | Top | Globals Index | Context Index | Back | Next |
|
syntax: replace_at(<S>,<old>,<new>,<which>) Returns S replaced at which with new if old is found |
| Function: reverse | Top | Globals Index | Context Index | Back | Next |
|
syntax: reverse(<str>) Reverse a string. |
| Function: reverse_dict | Top | Globals Index | Context Index | Back | Next |
|
syntax: reverse_dict(<D>) Values become keys and keys become values. |
| Function: rm | Top | Globals Index | Context Index | Back | Next |
|
syntax: rm(<path>) Remove a path (or file) |
| Function: rstrip | Top | Globals Index | Context Index | Back | Next |
|
syntax: rstrip(<str><chars><opt-IC>) description: If found, strip substring chars from end of s. If IC ignore case. |
| Function: save_obj | Top | Globals Index | Context Index | Back | Next |
|
syntax: save_obj(<object>,<file>) Save object to file. Uses cPicle |
| Function: serve_pdf | Top | Globals Index | Context Index | Back | Next |
|
syntax: serve_pdf(<file_name>,<pdf_content>) Serve a PDF document via CGI. |
| Function: setdefaults | Top | Globals Index | Context Index | Back | Next |
|
syntax: setdefaults(D,defaults) Set a series of defaults to a Dictionary |
| Function: set_decimal_places | Top | Globals Index | Context Index | Back | Next |
|
syntax: set_decimal_places(<val>,<precision>) Description: For a string representation of a decimal (floating point) value. |
| Function: set_dict | Top | Globals Index | Context Index | Back | Next |
|
syntax: set_dict(<dict><key><val>) Set dict value if key is non-existant |
| Function: set_n | Top | Globals Index | Context Index | Back | Next |
|
syntax: set_n(<series>,<n>,<v>) Set series[<n>] to <v> |
| Function: set_precision | Top | Globals Index | Context Index | Back | Next |
|
syntax: set_precision(<val>,<LP>,<RP>) Description: format decimal places before and after decimal point |
| Function: single | Top | Globals Index | Context Index | Back | Next |
|
syntax: single(X) Return the length of a series. If not series, return 0. |
| Function: single_space | Top | Globals Index | Context Index | Back | Next |
|
syntax: single_space(<S>) Reformat string, removing leading and trailing space and leaving no more than one space consecutively in the string |
| Function: skip | Top | Globals Index | Context Index | Back | Next |
|
syntax: skip(<series>,<skipnum>) skip('testthis',4) => this. Idiot proofed. |
| Function: sort_dict | Top | Globals Index | Context Index | Back | Next |
|
syntax: sort_dict(<dict>) sort and return items as nested list |
| Function: split_dict | Top | Globals Index | Context Index | Back | Next |
|
syntax: split_dict(<dict>) Returns a list of single pair dictionaries from dict |
| Function: split_first | Top | Globals Index | Context Index | Back | Next |
|
syntax: split_first(<str>,<delim=' >) Returns: first member of a split where delim defaults to SPACE |
| Function: sql2std | Top | Globals Index | Context Index | Back | Next |
|
syntax: sql2std(<val>) convert from an sql-style string to month(word)-day-year. |
| Function: sqr | Top | Globals Index | Context Index | Back | Next |
|
syntax: sqr(<num>) Returns the square of a number |
| Function: sqr_root | Top | Globals Index | Context Index | Back | Next |
|
syntax: sqr_root(<num>) returns integer floor of square root of num AND remainder |
| Function: string2dict | Top | Globals Index | Context Index | Back | Next |
|
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: string2file | Top | Globals Index | Context Index | Back | Next |
|
syntax: string2file(<str>,<filename>) write string to file_name without checking. |
| Function: stripTags | Top | Globals Index | Context Index | Back | Next |
|
syntax: stripTags(<label>,<replacement='') Description: Return copy of label with any tags removed or replaced. Note: Preferable to strip_tags |
| Function: strip_brs | Top | Globals Index | Context Index | Back | Next |
|
syntax: strip_brs(<label>) Remove any break tags from a string. |
| Function: strip_tags | Top | Globals Index | Context Index | Back | Next |
|
syntax: strip_tags(<label>,<replacement='') Description: Return copy of label with any tags removed or replaced. |
| Function: str_replace | Top | Globals Index | Context Index | Back | Next |
|
syntax: str_replace(<str>,<D-unwanted>) Return: str with any key from <unwanted> found in <str> with key value. |
| Function: str_round | Top | Globals Index | Context Index | Back | Next |
|
syntax: str_round(<val>,<pre>,<ndx=None>) Converts string to rounded integer. |
| Function: touch | Top | Globals Index | Context Index | Back | Next |
|
syntax: touch(<f>) Touch a file |
| Function: ToZip | Top | Globals Index | Context Index | Back | Next |
|
syntax: ToZip(<files>,<zip_file>,<dir=None>) ZIP a file and add to archive |
| Function: to_columns | Top | Globals Index | Context Index | Back | Next |
|
syntax: to_columns(<lst>,<cols>) Description: From a list, return nested list so that iteration displays on columns |
| Function: to_dec | Top | Globals Index | Context Index | Back | Next |
|
syntax: to_dec(<any>) Attempt to convert a string with commas to a decimal/float. |
| Function: to_int | Top | Globals Index | Context Index | Back | Next |
|
syntax: to_int(<any>) Attempt to convert a string with commas to an integer. |
| Function: to_matrix | Top | Globals Index | Context Index | Back | Next |
|
syntax: to_matrix(<lst>,<cols>) description: Creates matrix for sorting a one-dimension list on columns. Returns: Nested list of indexes. |
| Function: to_md5 | Top | Globals Index | Context Index | Back | Next |
|
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_nested | Top | Globals Index | Context Index | Back | Next |
|
syntax: to_nested(<L>,<cols>) Creates matrix to sort a one-dimensional list on rows. Return: indexes only |
| Function: to_sql_date | Top | Globals Index | Context Index | Back | Next |
|
syntax: to_sql_date(<val>,<sep='/'>) From mm/dd/yyyy format returns SQL format |
| Function: to_sql_date_time | Top | Globals Index | Context Index | Back | Next |
|
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_time | Top | Globals Index | Context Index | Back | Next |
|
syntax: to_sql_time(<val>,<sep>) Returns SQL time format from common time format |
| Function: try_int | Top | Globals Index | Context Index | Back | Next |
|
syntax: try_int(<str>) Attempt to convert a value to an integer. If fail, return original |
| Function: Type | Top | Globals Index | Context Index | Back | Next |
|
syntax: Type(<v>) Return a more readable type() function if in HTML environment. |
| Function: uname | Top | Globals Index | Context Index | Back | Next |
|
syntax: uname(<switch>) Run uname shell command with switch |
| Function: unique | Top | Globals Index | Context Index | Back | Next |
|
syntax: unique(<lst-tuple>) From list or tuple s return list of unique values. |
| Function: unpad_if_int | Top | Globals Index | Context Index | Back | Next |
|
syntax: unpad_if_int(<str>) Remove leading zeroes in S can be converted to int |
| Function: UnZip | Top | Globals Index | Context Index | Back | Next |
|
syntax: UnZip(zip_file) UNZIP an archive |
| Function: upperD | Top | Globals Index | Context Index | Back | Next |
|
syntax: upperD(<dict>) Convert all string keys of dict D' to uppercase. |
| Function: within | Top | Globals Index | Context Index | Back | Next |
|
syntax: within(<x>,<y>,<z>) Is y between x and z or equal to either? |
| Function: WriteLines | Top | Globals Index | Context Index | Back | Next |
|
syntax: WriteLines(<lines>,<file>) Write lines to file (name) |
| Function: zero_lengths | Top | Globals Index | Context Index | Back |
|
syntax: zero_lengths(<N>) Return a list of N zeroes. |
| Overview Of: BitMap | Top | Context Index | Globals Index | Next 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_set | Top | Context Index | Globals Index | Previous Function | Next Function | Next Context |
|
syntax: obj.is_set(<n>) Is bit n on val set(1) or unset(0)? |
| Function: obj.set | Top | Context Index | Globals Index | Previous Function | Next Function | Next Context |
|
syntax: obj.set(<*bits>) Set any number of bits. |
| Function: obj.test | Top | Context Index | Globals Index | Previous Function | Next Function | Next Context |
|
syntax: obj.test(<n>) Get value of bit n |
| Function: obj.uset | Top | Context Index | Globals Index | Previous Function | Next Function | Next Context |
|
syntax: obj.uset(<n>) Unset bit n |
| Function: obj.__call__ | Top | Context Index | Globals Index | Previous Function | Next 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 |
| Overview Of: date_tool | Top | Context Index | Globals Index | Next Function | Previous Context | Next Context |
|
General: Date Handling Tools |
| Function: obj.days | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.days() Return list of days of months |
| Function: obj.is_mysql_format | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.is_mysql_format(<str>) description: Make a reasonable test to confirm that S is in a sql format |
| Function: obj.mmddyyyy2sql | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next 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.months | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.months(<full=0>) Get a list of months. if full, return full names, else: return abbreviations |
| Function: obj.month_days | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.month_days() Return list of days of months |
| Function: obj.sql2mdy | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.sql2mdy(<dstr>,<parts=0>,<full=0>,<noraise=0> description: Convert from MySQL format to <mm/dd/yy> format |
| Function: obj.sql_to | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.sql_to(<dstr>,<parts=0>,<full=0>,<noraise=0>) description: Convert from MySQL format to text format |
| Function: obj.to_sql | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.to_sql(<month>,<day>,<year>) Convert month, day, and year to MySQL format |
| Function: obj.valid_month | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.valid_month(<str-m>) Is month a valid full name or abbreviation? |
| Function: obj.years | Top | Context Index | Globals Index | Previous Function | Previous Context | Next 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 |
| Overview Of: DisplayDict | Top | Context Index | Globals Index | Previous Context | Next Context |
|
General: Display Dictionary values as function calls. Useful inside of Eval() |
| Overview Of: EncodeShellChars | Top | Context Index | Globals Index | Next Function | Previous Context | Next 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.display | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.display(<str>) Substitute any unsafe chars with HTML character entity |
| Function: obj.escape | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.escape(<str>) Substitute any unsafe chars with backslashes |
| Function: obj.undisplay | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.undisplay(<str>) Description: Substitute any HTML character entities with corresponding character |
| Function: obj.unescape | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.unescape(<str>) Substitute any escaped character pairs with original character |
| Function: obj.__str__ | Top | Context Index | Globals Index | Previous Function | Previous Context | Next Context |
|
syntax: obj.__str__() Return lookup structures Example: print(Obj) |
| Overview Of: Eval | Top | Context Index | Globals Index | Next Function | Previous Context | Next Context |
|
syntax: Evaluate a string with named values. Initialize: with optional globels and locals |
| Function: obj.__getitem__ | Top | Context Index | Globals Index | Previous Function | Previous Context | Next Context |
|
Override: D.__getitem__(<key>) Syntax: res = D["key"] |
| Overview Of: Evalx | Top | Context Index | Globals Index | Next Function | Previous Context | Next Context |
|
syntax: Evaluate a string with named values globally Initialize: with optional globals and locals |
| Function: obj.__getitem__ | Top | Context Index | Globals Index | Previous Function | Previous Context | Next Context |
|
Override: D.__getitem__(<key>) [] override. Syntax: res = D["key"] |
| Overview Of: ldict | Top | Context Index | Globals Index | Next Function | Previous Context | Next Context |
|
General: Expanded dictionary functionality. Usage: Keys retrieved in same order as entered. Retrieval: multiple values can be accessed |
| Function: obj.get | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.get(<*keys>) Return a list of values for a list of keys. |
| Function: obj.insert | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.insert(<oldkey>,<newkey>,<val>) Insert newkey into obj.kys after oldkey |
| Function: obj.items | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.items() Return all pairs in order of addition. |
| Function: obj.values | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.values() Return all values in order. |
| Function: obj.__setitem__ | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next 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__ | Top | Context Index | Globals Index | Previous Function | Previous Context | Next 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' |
| Overview Of: Null | Top | Context Index | Globals Index | Previous Context | Next Context |
|
General: Handle null values Description: Null objects always and reliably do nothing.' |
| Overview Of: sdict | Top | Context Index | Globals Index | Next Function | Previous Context | Next Context |
|
General: Dictionary with a sorted list of keys. Initialize from list |
| Function: obj.add | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.add(<message>) Add a message |
| Function: obj.D | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D(<opt-keys>) If keys Return any number of values for keys Else: Return all keys |
| Function: obj.get | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.get(<key>) dict.get() |
| Function: obj.item | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.item(<key>) Return key and value |
| Function: obj.items | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.items() Return the ordered key/value pairs, ignoring the __keys__ key. |
| Function: obj.items | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.items(<D-keys>) If keys returns selective list of key/value pairs. Else: Return all items |
| Function: obj.keys | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.keys Return ordered keys ignoring __keys__ |
| Function: obj.order | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.order() Get sorted list of keys and values. |
| Function: obj.values | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: D.values() Return all ordered values, ignoring __keys__ |
| Function: obj.__getitem__ | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
Override: D.__getitem__(<key>) Return value for key or default Syntax: res = D["key"] |
| Function: obj.__setitem__ | Top | Context Index | Globals Index | Previous Function | Previous Context | Next Context |
|
Override: D.__setitem__(<key>,<value>) Set an item ONLY if it does not exist. Syntax: D["key"] = value |
| Overview Of: slst | Top | Context Index | Globals Index | Next Function | Previous Context | Next Context |
|
General: Addable and joinable mutable strings. Stored as list |
| Function: obj.add | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: obj.add(<val>) Add a value. |
| Function: obj.__call__ | Top | Context Index | Globals Index | Previous Function | Previous Context | Next Context |
|
syntax: obj.__call__(<sep=None>) Concatenate with or sep. If sep is int, return list example: obj(<sep>) |
| Overview Of: Str | Top | Context Index | Globals Index | Next Function | Previous Context | Next Context |
|
General: Enhanced string methods Methods:: find, change, setRadio, setChk,setForm,overwrite,div |
| Function: obj.change | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: s.change(<old>,<new>) |
| Function: obj.div | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: s.div(<ID>,<repl>) Replace text within a div tag. |
| Function: obj.find | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: s.find(<target>,<start=0>) |
| Function: obj.overwrite | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: s.overwrite(<start>,<stop>,<repl>) Description: Replace text beginning at [start] ending at [stop] |
| Function: obj.setChk | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: s.setChk(<D>) Set checked in <s> based on finding target with format: @%s%s@@: % key,D[key] |
| Function: obj.setform | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context | Next Context |
|
syntax: s.setform(<D>) Set values in <s> based on finding target as in name='%s' % key, setting to D[key] |
| Function: obj.setRadio | Top | Context Index | Globals Index | Previous Function | Previous Context | Next Context |
|
syntax: s.setRadio(<D>) Set checked in <s> based on finding target with format: @%s%s@@: % key,D[key] |
| Overview Of: Templater | Top | Context Index | Globals Index | Previous Context | Next 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. |
| Overview Of: toggler | Top | Context Index | Globals Index | Next 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.back | Top | Context Index | Globals Index | Previous Function | Next 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.first | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context |
|
syntax: T.first() Return item[0]. Reference unchanged. |
| Function: obj.last | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context |
|
syntax: T.last() Return last item. Reference unchanged. |
| Function: obj.next | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context |
|
syntax: T.next() Set reference to next item, if not at end, else reset to [0] Return: referenced item |
| Function: obj.reset | Top | Context Index | Globals Index | Previous Function | Next Function | Previous Context |
|
syntax: T.reset() Reset to head of list and return first item |
| Function: obj.T__call__ | Top | Context Index | Globals Index | Previous Function | Previous Context |
|
syntax: T__call__() Get the currently referenced item and advance the reference. Example: T() |