[IPython-User] IPython inputhook, higher rate?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[IPython-User] IPython inputhook, higher rate?

Gustavo Goretkin-2
I'm using IPython.lib.inputhook to run steps in a simulation (Box2D and pygame). When I run this step in my own loop, I can get many hundred of Hertz. When I use set_inputhook, I can only get 8 Hz. When IPython is integrated with GUI backends (like any of the matplotlib interactive backends), it's very responsive. Is there a setting I'm missing?

Thank you!
Gustavo



    def run_from_ipython():
        try:
            __IPYTHON__
            return True
        except NameError:
            return False

    if not run_from_ipython():
        while domain.running:
            domain.run_step()
    else:
        from IPython.lib import inputhook

        def step():
            domain.run_step()
            return domain.running

        inputhook.set_inputhook(step)




_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: IPython inputhook, higher rate?

Gustavo Goretkin-2
If anyone has any ideas, let me know!


On Thu, Aug 28, 2014 at 1:25 PM, Gustavo Goretkin <[hidden email]> wrote:
I'm using IPython.lib.inputhook to run steps in a simulation (Box2D and pygame). When I run this step in my own loop, I can get many hundred of Hertz. When I use set_inputhook, I can only get 8 Hz. When IPython is integrated with GUI backends (like any of the matplotlib interactive backends), it's very responsive. Is there a setting I'm missing?

Thank you!
Gustavo



    def run_from_ipython():
        try:
            __IPYTHON__
            return True
        except NameError:
            return False

    if not run_from_ipython():
        while domain.running:
            domain.run_step()
    else:
        from IPython.lib import inputhook

        def step():
            domain.run_step()
            return domain.running

        inputhook.set_inputhook(step)





_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: IPython inputhook, higher rate?

Thomas Kluyver-2

Try on ipython-dev, we're slowly merging this list into that, so you might get a better response there.


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user