Part of twisted.python View Source
Class | InsensitiveDict | Dictionary, that has case-insensitive keys. |
Class | OrderedDict | A UserDict that preserves insert order whenever possible. |
Function | uniquify | Make the elements of a list unique by inserting them into a dictionary. |
Function | padTo | Pads a sequence out to n elements, |
Function | getPluginDirs | Undocumented |
Function | addPluginDir | Undocumented |
Function | sibpath | Return the path to a sibling of a file in the filesystem. |
Function | _getpass | Helper to turn IOErrors into KeyboardInterrupts |
Function | getPassword | Obtain a password by prompting or from stdin. |
Function | dict | Undocumented |
Function | println | Undocumented |
Function | str_xor | Undocumented |
Function | keyed_md5 | Create the keyed MD5 string for the given secret and challenge. |
Function | makeStatBar | Creates a function that will return a string representing a progress bar. |
Function | spewer | A trace function for sys.settrace that prints every function or method call. |
Function | searchupwards | Walk upwards from start, looking for a directory containing |
Class | LineLog | A limited-size line-based log, useful for logging line-based |
Function | raises | Determine whether the given call raises the given exception |
Class | IntervalDifferential | Given a list of intervals, generate the amount of time to sleep between |
Class | _IntervalDifferentialIterator | Undocumented |
Class | FancyStrMixin | Set showAttributes to a sequence of strings naming attributes, OR |
Class | FancyEqMixin | Undocumented |
Function | dsu | Undocumented |
Function | _setgroups_until_success | Undocumented |
Function | initgroups 0 | Initializes the group access list. |
Function | initgroups | Do nothing. |
Function | switchUID | Undocumented |
Class | SubclassableCStringIO | A wrapper around cStringIO to allow for subclassing |
Function | moduleMovedForSplit | Undocumented |
Function | untilConcludes | Undocumented |
Function | unsignedID | Return the id of an object as an unsigned number so that its hex |
Function | mergeFunctionMetadata | Overwrite g 's docstring and name with values from
f . Update
|
Function | nameToLabel | Convert a string like a variable name into a slightly more human-friendly |
Pads a sequence out to n elements,
filling in with a default value if it is not long enough.
If the input sequence is longer than n, raises ValueError.
Details, details: This returns a new list; it does not extend the original sequence. The new list contains the values of the original sequence, not copies.Return the path to a sibling of a file in the filesystem.
This is useful in conjunction with the special __file__ attribute that Python provides for modules, so modules can load associated resource files.Obtain a password by prompting or from stdin.
If stdin is a terminal, prompt for a new password, and confirm (if
confirm
is true) by asking again to make sure the user typed
the same thing, as keystrokes will not be echoed.
forceTTY
is not true,
read in a line and use it as the password, less the trailing newline, if
any. If forceTTY
is true, attempt to open a tty and prompt
for the password using it. Raise a RuntimeError if this is not
possible.
Returns | str
|
>> searchupwards('.', ['foo.txt'], ['bar', 'bam'])If not found, return None
Initializes the group access list.
This is done by reading the group database /etc/group and using all
groups of which uid
is a member. The additional group
primaryGid
is also added to the list.
NGROUPS
,
arbitrary groups will be silently discarded to bring the number below
that limit.
Do nothing.
Underlying platform support require to manipulate groups is missing.g
's docstring and name with values from
f
. Update g
's instance dictionary with
f
's.
Parameters | mname | The name to convert to a label. This must be a string which could be
used as a Python identifier. Strings which do not take this form will
result in unpredictable behavior.
(type: str
) |
Returns | (type: str
) |