Unable to set profile for embedded shell
- 主要言語
- Python
- スター
- 16.8k
- フォーク
- 4.5k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 6
説明
I'm trying to use an embedded IPython shell for a simple program.
I want to use a custom profile for the program to have it's own history and possibly other options.
Looking into https://ipython.readthedocs.io/en/stable/interactive/reference.html#embedding and
https://ipython.readthedocs.io/en/stable/config/options/terminal.html, i came up with:
```python
from IPython.terminal.embed import InteractiveShellEmbed
from traitlets.config.loader import Config
cfg = Config()
cfg.BaseIPythonApplication.profile = 'my_new_profile'
cfg.BaseIPythonApplication.auto_create = True
cfg.BaseIPythonApplication.copy_config_files = True
shell = InteractiveShellEmbed(config=cfg, banner1='Custom IPython shell')
shell()
print(shell.profile)
```
However, this still uses the `default` profile and has all my normal ipython history.
What am I doing wrong?
コントリビューションガイド
評価
この issue はまだ評価されていません。