bundles / IPython 9.5.0 / IPython / utils / tokenutil / token_at_cursor
function
IPython.utils.tokenutil:token_at_cursor
source: /IPython/utils/tokenutil.py :97
Signature
def token_at_cursor ( cell : str , cursor_pos : int = 0 ) → str Summary
Get the token at a given cursor
Extended Summary
Used for introspection.
Function calls are prioritized, so the token for the callable will be returned if the cursor is anywhere inside the call.
Parameters
cell: strA block of Python code
cursor_pos: intThe location of the cursor in the block where the token should be found
Aliases
-
IPython.utils.tokenutil.token_at_cursor