Package topo :: Package misc :: Module commandline :: Class IPCommandPromptHandler
[hide private]
[frames] | no frames]

Class IPCommandPromptHandler

source code

object --+
         |
        IPCommandPromptHandler
Known Subclasses:

Allows control over IPython's dynamic command prompts.
Instance Methods [hide private]

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods [hide private]
 
set_format(cls, format)
classmethod(function) -> method
source code
 
get_format(cls)
classmethod(function) -> method
source code
Class Variables [hide private]
  _format = ''
str(object) -> string
  _prompt = ''
str(object) -> string
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

set_format(cls, format)
Class Method

source code 

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:

class C:
def f(cls, arg1, arg2, ...): ... f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.

Class methods are different than C++ or Java static methods. If you want those, see the staticmethod builtin.

get_format(cls)
Class Method

source code 

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:

class C:
def f(cls, arg1, arg2, ...): ... f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.

Class methods are different than C++ or Java static methods. If you want those, see the staticmethod builtin.


Class Variable Details [hide private]

_format

str(object) -> string

Return a nice string representation of the object. If the argument is a string, the return value is the same object.

Value:
''

_prompt

str(object) -> string

Return a nice string representation of the object. If the argument is a string, the return value is the same object.

Value:
''