Package libxyz :: Package core :: Module dsl :: Class XYZ
[hide private]
[frames] | no frames]

Class XYZ

source code

object --+
         |
        XYZ

XYZ DSL implementation object

Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, xyz) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
let(cls, var, val, sect=u"local")
Set variable.
source code
 
val(cls, var, sect=u"local")
Return variable value or None if undefined
source code
 
unlet(cls, var, sect=u"local")
Unset variable
source code
 
load(cls, plugin)
Load method[s] from plugin
source code
 
bind(cls, method, shortcut, context="DEFAULT")
Bind method to shortcut
source code
 
kbd(cls, *args)
Create keyboard shortcut
source code
 
exec_file(cls, filename)
Execute DSL in file
source code
 
action(cls, rule, fn)
Set up an action to be taken upon pressing action key on file
source code
 
macro(cls, macroname)
Expand macro name.
source code
 
call(cls, method, *args)
Call plugin method
source code
 
env(cls, var, default=None)
Return environment variable or default if is not set
source code
 
shell(cls, cmd, *args, **kwargs)
Execute command via :core:shell plugin Optional boolean argument 'current' can be provided to indicate that cmd is to be run from current directory.
source code
 
alias(cls, alias, replace)
Set an alias which will be expanded in command line before execution
source code
 
icmd(cls, command, obj)
Set an internal command.
source code
 
plugins_on(cls, *plugins)
Enable plugin[s]
source code
 
plugins_off(cls, *plugins)
Disable plugin[s]
source code
 
plugin_conf(cls, plugin, opts)
Configure plugin.
source code
 
prefix(cls, shortcut)
Set new prefix key
source code
 
help(cls, obj=None)
Help
source code
 
execute(cls, source)
Execute DSL statements
source code
 
get_env(cls)
Return copy of global dsl environment
source code
Class Variables [hide private]
  api = ["let", "val", "unlet", "load", "bind", "exec_file", "kb...
  macros = {}
  _instance = None
hash(x)
  _env = {}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, xyz)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

let(cls, var, val, sect=u"local")
Class Method

source code 

Set variable. Variable will be available in xyz.conf[section][varname] If section is not provided - local will be used

Decorators:
  • @instantiated

val(cls, var, sect=u"local")
Class Method

source code 

Return variable value or None if undefined

Decorators:
  • @instantiated

unlet(cls, var, sect=u"local")
Class Method

source code 

Unset variable

Decorators:
  • @instantiated

load(cls, plugin)
Class Method

source code 

Load method[s] from plugin

Decorators:
  • @instantiated

bind(cls, method, shortcut, context="DEFAULT")
Class Method

source code 

Bind method to shortcut

Decorators:
  • @instantiated

kbd(cls, *args)
Class Method

source code 

Create keyboard shortcut

Decorators:
  • @instantiated

exec_file(cls, filename)
Class Method

source code 

Execute DSL in file

Decorators:
  • @instantiated

action(cls, rule, fn)
Class Method

source code 

Set up an action to be taken upon pressing action key on file

Decorators:
  • @instantiated

macro(cls, macroname)
Class Method

source code 

Expand macro name.

Availbale macros: * ACT_CWD -- Working directory in active panel * INACT_CWD -- Working directory in inactive panel * ACT_PATH -- Full selected object path in active panel * INACT_PATH -- Full selected object path in inactive panel * ACT_BASE -- Parent directory in active panel * INACT_BASE -- Parent directory in inactive panel * ACT_TAGGED -- List of tagged files in active panel * INACT_TAGGED -- List of tagged files in inactive panel * ACT_UNTAGGED -- List of not tagged files in active panel * INACT_UNTAGGED -- List of not tagged files in inactive panel

Decorators:
  • @instantiated

call(cls, method, *args)
Class Method

source code 

Call plugin method

Decorators:
  • @instantiated

env(cls, var, default=None)
Class Method

source code 

Return environment variable or default if is not set

Decorators:
  • @instantiated

shell(cls, cmd, *args, **kwargs)
Class Method

source code 

Execute command via :core:shell plugin Optional boolean argument 'current' can be provided to indicate that cmd is to be run from current directory. Optional boolean argument 'bg' can be provided to indicate that cmd must be executed in background Optional boolean argument 'reload' can be provided to indicate that panel content should/should not be reloaded after execution

Decorators:
  • @instantiated

alias(cls, alias, replace)
Class Method

source code 

Set an alias which will be expanded in command line before execution

Parameters:
  • replace - Either string or function
Decorators:
  • @instantiated

icmd(cls, command, obj)
Class Method

source code 

Set an internal command.

Decorators:
  • @instantiated

plugins_on(cls, *plugins)
Class Method

source code 

Enable plugin[s]

Decorators:
  • @instantiated

plugins_off(cls, *plugins)
Class Method

source code 

Disable plugin[s]

Decorators:
  • @instantiated

plugin_conf(cls, plugin, opts)
Class Method

source code 

Configure plugin.

Parameters:
  • plugin - Plugin name
  • opts - Either tuple (var, val) or dict {var1: val1, var2: var2,..}
Decorators:
  • @instantiated

prefix(cls, shortcut)
Class Method

source code 

Set new prefix key

Decorators:
  • @instantiated

help(cls, obj=None)
Class Method

source code 

Help

Decorators:
  • @instantiated

execute(cls, source)
Class Method

source code 

Execute DSL statements

Parameters:
  • source - Either string or open file-object or code object
Decorators:
  • @instantiated

get_env(cls)
Class Method

source code 

Return copy of global dsl environment

Decorators:
  • @instantiated

Class Variable Details [hide private]

api

Value:
["let", "val", "unlet", "load", "bind", "exec_file", "kbd", "action", \
"macro", "call", "env", "shell", "alias", "plugins_on", "plugins_off",\
 "plugin_conf", "icmd", "prefix", "help",]