pycmd_public
index
d:\users\horea\pycmd\pycmd_public.py

Public constants, objects and utilities exported by PyCmd.
 
These are meant to be used in init.py files; users can rely on them being kept
unchanged (interface-wise) throughout later versions.

 
Modules
       
common
console
os
sys

 
Classes
       
__builtin__.object
color
_Settings(__builtin__.object)
Behavior

 
class Behavior(_Settings)
    Behavior settings
 
 
Method resolution order:
Behavior
_Settings
__builtin__.object

Methods defined here:
__init__(self)
sanitize(self)

Data descriptors inherited from _Settings:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class color(__builtin__.object)
    Constants for color manipulation within PyCmd.
 
These constants are similar to ANSI escape sequences, only more powerful in
the sense that they support setting, resetting and toggling of individual R,
G, B components
 
  Static methods defined here:
update()
Update the current values of the DEFAULT color constant -- we have
to adapt these since they might change (e.g. with the "color"
command).

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
Back = <class 'pycmd_public.Back'>
Color constants for the background
Fore = <class 'pycmd_public.Fore'>
Color constants for the foreground

 
Functions
       
abbrev_path(path=None)
Abbreviate a full path (or the current path, if None is provided) to make
it shorter, yet still unambiguous.
 
This function takes a directory path and tries to abbreviate it as much as
possible while making sure that the resulting shortened path is not
ambiguous: a path element is only abbreviated if its shortened form is
unique in its directory (in other words, if a sybling would have the same
abbreviation, the original name is kept).
 
The abbreviation is performed by keeping only the first letter of each
"word" composing a path element. "Words" are defined by CamelCase,
underscore_separation or "whitespace separation".
abbrev_path_prompt()
Return a prompt containg the current path (abbreviated)
 
This is the default PyCmd prompt. It uses the abbrev_path() function to
obtain the shortened path and appends the typical '> '.

 
Data
        appearance = <pycmd_public._Appearance object>
behavior = <pycmd_public.Behavior object>