GNUmed general tools.
Author:
K. Hilbert <Karsten.Hilbert@gmx.net>
License:
GPL v2 or later (details at http://www.gnu.org)
|
|
| handle_uncaught_exception_console(t,
v,
tb) |
source code
|
|
|
|
|
|
|
|
|
|
unicode2charset_encoder(unicode_csv_data,
encoding='utf-8') |
source code
|
|
|
|
unicode_csv_reader(unicode_csv_data,
dialect=<class csv.excel at 0x8515adc>,
encoding='utf-8',
**kwargs) |
source code
|
|
|
|
get_unique_filename(prefix=None,
suffix=None,
tmp_dir=None)
This introduces a race condition between the file.close() and
actually using the filename. |
source code
|
|
|
|
import_module_from_directory(module_path=None,
module_name=None,
always_remove_path=False)
Import a module from any location. |
source code
|
|
|
|
|
|
|
| bool2subst(boolean=None,
true_return=True,
false_return=False,
none_return=None) |
source code
|
|
|
|
bool2str(boolean=None,
true_str='True',
false_str='False') |
source code
|
|
|
|
none_if(value=None,
none_equivalent=None,
strip_string=False)
Modelled after the SQL NULLIF function. |
source code
|
|
|
|
coalesce(initial=None,
instead=None,
template_initial=None,
template_instead=None,
none_equivalents=None,
function_initial=None)
Modelled after the SQL coalesce function. |
source code
|
|
|
|
|
|
|
|
|
|
| input2int(initial=None,
minval=None,
maxval=None) |
source code
|
|
|
|
strip_leading_empty_lines(lines=None,
text=None,
eol=...) |
source code
|
|
|
|
strip_trailing_empty_lines(lines=None,
text=None,
eol=...) |
source code
|
|
|
|
wrap(text=None,
width=None,
initial_indent=u'',
subsequent_indent=u'',
eol=...)
A word-wrap function that preserves existing line breaks
and most spaces in the text. |
source code
|
|
|
|
unwrap(text=None,
max_length=None,
strip_whitespace=True,
remove_empty_lines=True,
line_separator=u' // ') |
source code
|
|
|
|
xml_escape_string(text=None)
check for special XML characters and transform them |
source code
|
|
|
|
tex_escape_string(text=None)
check for special LaTeX characters and transform them |
source code
|
|
|
|
|
|
|
|
|
|
__doc__ = """GNUmed general tools."""
|
|
|
u_right_double_angle_quote = u'«'
|
|
|
u_registered_trademark = u'®'
|
|
|
u_plus_minus = u'±'
|
|
|
u_left_double_angle_quote = u'»'
|
|
|
u_one_quarter = u'¼'
|
|
|
u_one_half = u'½'
|
|
|
u_three_quarters = u'¾'
|
|
|
u_multiply = u'×'
|
|
|
u_ellipsis = u'…'
|
|
|
u_euro = u'€'
|
|
|
u_numero = u'№'
|
|
|
u_down_left_arrow = u'↵'
|
|
|
u_left_arrow = u'←'
|
|
|
u_right_arrow = u'→'
|
|
|
u_sum = u'∑'
|
|
|
u_almost_equal_to = u'≈'
|
|
|
u_corresponds_to = u'≘'
|
|
|
u_infinity = u'∞'
|
|
|
u_diameter = u'⌀'
|
|
|
u_checkmark_crossed_out = u'⍻'
|
|
|
u_box_horiz_single = u'─'
|
|
|
u_box_horiz_4dashes = u'┈'
|
|
|
u_box_top_double = u'═'
|
|
|
u_box_top_left_double_single = u'╒'
|
|
|
u_box_top_right_double_single = u'╕'
|
|
|
u_box_top_left_arc = u'╭'
|
|
|
u_box_bottom_right_arc = u'╯'
|
|
|
u_box_bottom_left_arc = u'╰'
|
|
|
u_box_horiz_light_heavy = u'╼'
|
|
|
u_box_horiz_heavy_light = u'╾'
|
|
|
u_skull_and_crossbones = u'☠'
|
|
|
u_frowning_face = u'☹'
|
|
|
u_smiling_face = u'☺'
|
|
|
u_black_heart = u'♥'
|
|
|
u_checkmark_thin = u'✓'
|
|
|
u_checkmark_thick = u'✔'
|
|
|
u_writing_hand = u'✍'
|
|
|
u_pencil_1 = u'✎'
|
|
|
u_pencil_2 = u'✏'
|
|
|
u_pencil_3 = u'✐'
|
|
|
u_latin_cross = u'✝'
|
|
|
u_replacement_character = u'�'
|
|
|
u_link_symbol = u'ὑ7'
|
|
|
default_csv_reader_rest_key = u'list_of_values_of_unknown_fields'
|
|
|
CAPS_ALLCAPS = 2
|
|
|
CAPS_FIRST = 1
|
|
|
CAPS_FIRST_ONLY = 5
|
|
|
CAPS_NAMES = 4
|
|
|
CAPS_NONE = 0
|
|
|
CAPS_WORDS = 3
|
|
|
__package__ = 'Gnumed.pycommon'
|