ezsys
Search uses release 0.1.0.0 · 176 definitions
Definitions (176)
- def file.reada whole file's text; a failure to open or read it is a Fail, never an exit
- def file.writereplace a file's whole text, creating it when it is missing
- def file.savewrite `<path>.tmp`, flush it, and rename it over path, so a reader sees the old text or the new, never part of either
- def env.oran environment variable's value (even an empty one), or fallback when it is unset
- def time.nowthe wall clock: whole seconds since 1970-01-01T00:00:00Z, and the milliseconds past them
- def time.isoISO 8601 UTC, `YYYY-MM-DDTHH:MM:SS.mmmZ`, of seconds since the epoch and a millisecond
- def time.civilthe civil fields of seconds since the epoch, in UTC: year, month, day, hour, minute, second and ISO weekday (1 Monday to 7 Sunday)
- def time.iso_weekthe ISO 8601 week-numbering year and week of seconds since the epoch
- def time.iso_week_textthe ISO 8601 week as `date -u +%G-W%V` writes it, e.g.
- def time.now_isothe wall clock as ISO 8601 UTC
- def text.fillevery `{{key}}` in a template replaced by its value; unknown and unclosed markers are left as written
- def text.fill_withthe same with other delimiters, e.g.
- def text.stripthe text with Python's whitespace removed from both ends (str.strip())
- def text.lstripthe text with Python's whitespace removed from its start (str.lstrip())
- def text.rstripthe text with Python's whitespace removed from its end (str.rstrip())
- def text.replaceevery `old` replaced by `new`, left to right, never overlapping (str.replace); an empty `old` puts `new` around every character
- def text.splitthe pieces between every `sep` (str.split(sep)); an empty `sep` answers the text as its one piece
- def text.findthe index in code points where `needle` first starts, or None (str.find)
- def text.lowerthe text in lowercase (str.lower) for ASCII, Latin-1, Latin Extended-A, Greek and Cyrillic; other code points are kept
- def text.upperthe text in uppercase (str.upper) for ASCII, Latin-1, Latin Extended-A, Greek and Cyrillic; other code points are kept
- def text.pad_rightthe text with spaces after it up to `width` code points (str.ljust)
- def text.truncatethe first `width` code points of the text (txt[:width])
- def digits.cmptwo strings of ASCII digits in numeric order, any length
- def dir.lista directory's names, sorted by code point, with no "." or ".."; a failure to read it is a Fail, never an exit
- def err.osa failed file operation as Python's OSError writes it: `[Errno 2] No such file or directory: '/tmp/x'`
- type Ymda calendar date
- def time.digit.atthe k-th decimal digit character (9 for anything past it)
- def time.digitthe decimal digit of n's last place
- def time.civil.monththe month of a March-based month index (0 is March)
- def time.civil.yearthe calendar year of a March-based year: January and February are the next calendar year's
- def time.civilthe year, month and day of a day number (days since 1970-01-01)
- def time.twotwo decimal places: tens and units
- def time.threethree decimal places: hundreds, tens and units
- def time.fourfour decimal places: thousands, hundreds, tens and units
- def time.ymdYYYY-MM-DD
- def time.ymd.ofthe date of a calendar date
- def time.dateYYYY-MM-DD of a day number
- def time.clockHH:MM:SS.mmmZ of a second of the day and a millisecond (its last three decimal places)
- def time.isoISO 8601 UTC of seconds since the epoch and a millisecond
- def time.iso.ofISO 8601 UTC of a clock reading: seconds and milliseconds
- type Wdthe days of the week
- def time.wd.nextthe next day of the week: Sunday is followed by Monday
- def time.wd.numthe ISO 8601 weekday number of a day of the week: 1 Monday to 7 Sunday
- def time.wd.gothe day of the week `left` days after `day`, one day at a time
- def time.weekday.natthe ISO weekday of day `num` after 1970-01-01, a Thursday, counted one day at a time: the weekday's definition, which time.weekday computes faster
- def time.wd.plustwo weekdays added as offsets from Monday (Monday is 0, Sunday 6), so `time.wd.plus(day, off)` is the weekday `off` days after `day`
- def time.wd.bitsthe day of the week a word's value in days after a Monday, one bit at a time from the lowest: the value is the bit plus twice the rest's
- def time.weekdaythe ISO weekday of a day number, in 32 steps, one a bit
- def time.jan1the day number of 1 January of a year from 1970 on: Howard Hinnant's days_from_civil for month 1, day 1
- def time.thursdaythe Thursday of a day's ISO week (Monday to Sunday)
- def time.week.ofthe ISO year and week of a week's Thursday: the Thursday's calendar year, and how many Thursdays of that year it is
- def time.weekthe ISO 8601 week-numbering year and week of a day number
- def time.iso_weekthe ISO 8601 week-numbering year and week of seconds since the epoch
- def time.week.textYYYY-Www of an ISO year and week, as `date +%G-W%V` writes it
- def time.iso_week_textYYYY-Www of seconds since the epoch
- def time.fields.ofa date, a second of the day and a weekday as the civil fields
- def time.fieldsyear, month, day, hour, minute, second and ISO weekday of seconds since the epoch, in UTC
- def dir.dotwhether a name is "." or ".."
- def dir.insert.pickname before next when it sorts first, else next and the rest with name put in them
- def dir.inserta name put into a sorted list, before the first name it does not sort after
- def dir.sorta list sorted ascending by String.order (insertion sort)
- def dir.keep.picka name kept unless it is "." or ".."
- def dir.keepthe names that are not "." or "..", in their order
- def dir.nameswhat dir.list answers for the raw names a directory read gave
- def dir.stepwhat dir.list answers for a directory read's answer: its names, or the failure unchanged
- def err.Tablethe codes and their texts, reusable
- def err.tablethe common Linux codes and glibc's text for each, as os.strerror gives it
- def err.whenwhat is written when hit holds, else what the rest writes
- def err.lookthe text of the first pair with the code, or why when there is none
- def err.texta code's text: the table's, or why when the table does not list it
- def err.quote.pickthe quote a path is written between: " when it holds a ' and no ", else '
- def err.quotethe quote repr picks for a path
- def err.hexedthe code points repr writes as \xhh: below U+0020, U+007F to U+00A0, and U+00AD
- def err.hex.ora digit's character, or '0' past the digits
- def err.hex.digitthe lowercase hex digit of a number's last four bits
- def err.hex2two lowercase hex digits of a number's last eight bits
- def err.ctla control character: \t, \n, \r, or \xhh
- def err.plainany other character: a backslash or the quote escaped, else itself
- def err.escone character of a path between the quote q
- def err.goa path's characters between the quote q
- def err.repra path as Python's repr(str) writes it
- def err.osa failed file operation as Python's OSError writes it
- type Readafter one read: read again with the text so far, or stop with an answer
- type Saveafter the temporary file is written: rename it, or stop with a failure
- def read.chunkthe bytes one read asks for: the file's size, and at least 64 KiB
- def read.morea chunk that is empty ends the file; any other is appended
- def read.stepwhat one read's answer means, with the text read before it
- def read.spentthe answer when a file has not ended after every read file.read makes
- def save.tmpwhere file.save writes before it renames
- def save.stepwhat the temporary file's write answer means
- def env.pickan environment variable's value, or the fallback when it is unset
- def text.spacesPython's whitespace (str.isspace, str.strip with no argument): the code points 9 to 13, 28 to 32, 133, 160, 5760, 8192 to 8202, 8232, 8233, 8239, 8287 and 12288
- def text.spacewhether a character is Python whitespace
- def text.lstrip.ifa character at the start: dropped when it is whitespace, and the rest stripped too; else the text is kept from it
- def text.lstripthe text with its leading whitespace removed
- def text.rstrip.lonea lone last character: gone when it is whitespace
- def text.rstrip.puta character before the stripped rest: when nothing is left after it, it goes too if it is whitespace
- def text.rstripthe text with its trailing whitespace removed
- def text.stripthe text with whitespace removed from both ends
- def text.afterhow many characters of a separator follow its first