🖥

I want to do something like binding.pry for #ruby with #python (follow

2019/04/18に公開

<ul><li> <code>continue</code> does not work </li><li> <code>next</code> is something different </li><li> Let's go next with <code>exit</code> # script <code>py #!/usr/bin/env python3 from IPython.terminal.embed import InteractiveShellEmbed for i in range(5): ipshell = InteractiveShellEmbed() ipshell()</code> 2 (default, Jan 13 2019, 12: 50: 01) Type 'copyright', 'credits' or 'license' for more information IPython 7.4.0-An enhanced Interactive Python. Type '?' For help. In [1 ]: i Out [1]: 0 In [2]: i Out [2]: 0 In [3]: continue File "<ipython-input-3-6ca52a340915>", line 4 SyntaxError: 'continue' not properly in loop </li></ul><p> In [4]: break File "<ipython-input-4-6aaf1f276005>", line 4 SyntaxError: 'break' outside loop </p><p> In [5]: next Out [5]: <function next> In [6]: i Out [6]: 0 In [7]: i Out [7]: 0 In [8]: exit Python 3.7.2 ( default, Jan 13 2019, 12: 50: 01) Type 'copyright', 'credits' or 'license' for more information IPython 7.4.0-An enhanced Interactive Python. Type '?' for help. In [1]: i Out [1]: 1 In [2]: exit Python 3.7.2 (default, Jan 13 2019, 12:50:01) Type 'copyright', 'credits' or 'license' for more information IPython 7.4.0- In [1]: i Out [1]: 2 In [2]: exit Python 3.7.2 (default, Jan 13 2019, 12: 50: 01) Type '-An enhanced Interactive Python. copyright ',' credits' or 'license' for more information IPython 7.4.0-An enhanced Interactive Python. Type '?' for help. In [1]: i Out [1]: 3 In [2]: `` ` </p><h1> ref </h1><p> <a href="https://qiita.com/taise/items/063829ac89bf1def36d0">Launch an interactive shell while running Python-Qiita</a> </p>

Original by Github issue

https://github.com/YumaInaura/YumaInaura/issues/1318

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

Twitter

https://twitter.com/YumaInaura

公開日時

2019-04-18

Discussion