COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
shesha.util.ipython_embed.CustomPrompt Class Reference
Inheritance diagram for shesha.util.ipython_embed.CustomPrompt:
Collaboration diagram for shesha.util.ipython_embed.CustomPrompt:

Public Member Functions

def __init__ (self, shell)
 
def setName (self, name)
 
def in_prompt_tokens (self, cli=None)
 
def out_prompt_tokens (self)
 

Public Attributes

 name
 

Static Public Attributes

string name = ""
 

Detailed Description

Definition at line 5 of file ipython_embed.py.

Constructor & Destructor Documentation

◆ __init__()

def shesha.util.ipython_embed.CustomPrompt.__init__ (   self,
  shell 
)

Definition at line 8 of file ipython_embed.py.

8  def __init__(self, shell):
9  Prompts.__init__(self, shell)
10 

Member Function Documentation

◆ in_prompt_tokens()

def shesha.util.ipython_embed.CustomPrompt.in_prompt_tokens (   self,
  cli = None 
)

Definition at line 14 of file ipython_embed.py.

14  def in_prompt_tokens(self, cli=None):
15  return [
16  (Token.Prompt, self.name),
17  (Token.Prompt, ' In ['),
18  (Token.PromptNum, str(self.shell.execution_count)),
19  (Token.Prompt, ']: '),
20  ]
21 

◆ out_prompt_tokens()

def shesha.util.ipython_embed.CustomPrompt.out_prompt_tokens (   self)

Definition at line 22 of file ipython_embed.py.

22  def out_prompt_tokens(self):
23  return [
24  (Token.OutPrompt, self.name),
25  (Token.OutPrompt, ' Out['),
26  (Token.OutPromptNum, str(self.shell.execution_count)),
27  (Token.OutPrompt, ']: '),
28  ]
29 
30  def embed(name: str="", loc_vars: dict=None):

◆ setName()

def shesha.util.ipython_embed.CustomPrompt.setName (   self,
  name 
)

Definition at line 11 of file ipython_embed.py.

11  def setName(self, name):
12  self.name = name
13 

Member Data Documentation

◆ name [1/2]

string shesha.util.ipython_embed.CustomPrompt.name = ""
static

Definition at line 6 of file ipython_embed.py.

◆ name [2/2]

shesha.util.ipython_embed.CustomPrompt.name

Definition at line 12 of file ipython_embed.py.


The documentation for this class was generated from the following file: