module ipythonhelper.kindofcompletion
¶
Short summary¶
module pyquickhelper.ipythonhelper.kindofcompletion
A custom way to add auto completion to IPython
Classes¶
class |
truncated documentation |
---|---|
You can add auto completion object to IPython by adding member to an instance of this class. All members must begin … |
|
builds a tree based on a list of files, the class adds |
Properties¶
property |
truncated documentation |
---|---|
return the value |
|
|
return the value |
returns all the members |
|
|
returns all the members |
Methods¶
method |
truncated documentation |
---|---|
constructor |
|
constructor |
|
returns the number of elements |
|
|
returns the number of elements |
returns a string |
|
|
returns a string |
add a member to this class, add an |
|
|
add a member to this class, add an |
Removes unexpected characters for a file name. |
|
populate the class with files and folder in the folder this class holds |
Documentation¶
A custom way to add auto completion to IPython
- class pyquickhelper.ipythonhelper.kindofcompletion.AutoCompletion(value=None)[source]¶
Bases:
object
You can add auto completion object to IPython by adding member to an instance of this class.
All members must begin by
_
constructor
- Parameters:
value – any value of object
- _add(member, value)[source]¶
add a member to this class, add an
AutoCompletion
instance, creates one if value is not fromAutoCompletion
type- Parameters:
member – name of the new member
value – value to add
- Returns:
(AutoCompletion)
- class pyquickhelper.ipythonhelper.kindofcompletion.AutoCompletionFile(value)[source]¶
Bases:
AutoCompletion
builds a tree based on a list of files, the class adds
A__
before every folder or file starting with_
File autocompletion in IPython
The following code:
from pyquickhelper.ipythonhelper import AutoCompletionFile d = AutoCompletionFile(".")
Will produce the following auto completion picture:
constructor
- Parameters:
value – directory
- _filter(s)[source]¶
Removes unexpected characters for a file name.
- Parameters:
s – filename
- Returns:
cleaned filename