You are viewing an older version (9.12.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.12.0 / IPython / utils / text / LSString

class

IPython.utils.text:LSString

source: /IPython/utils/text.py :34

Members

Summary

String derivative with a special access attributes.

Extended Summary

These are normal strings, but with the special attributes:

.l (or .list)value as list (split on newlines). .n (or .nlstr): original value (the string itself). .s (or .spstr): value as whitespace-separated string. .p (or .paths): list of path objects (requires path.py package)

Any values which require transformations are computed only once and cached.

Such strings are very useful to efficiently interact with the shell, which typically only understands whitespace-separated options for commands.

Aliases

  • IPython.core.interactiveshell.LSString