Ipython raw_input work around?

拥有回忆 提交于 2019-12-11 00:52:46

问题


I'm running a Python program that wants to accept raw_input which Ipython notebook does not do. (a known limitation)

What is a recommended way to achieve the functionality? (work around?) What I'd like to do is to be able to run the program, accept input and respond..(will be choices determined based on information retrieved), and also prompting for user id and password info..

Of course I'd like to do as little violence to the existing code as possible.

I found IPython.utils.io.raw_input_ext(prompt='', ps2='... ') in the Ipython docs but it calls raw_input and gets the same not implemented error


回答1:


Last developement version of IPython now support raw_input in notebook. (since beginning of may 2013 for future reader)



来源:https://stackoverflow.com/questions/14667144/ipython-raw-input-work-around

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!