Closed oliver-zehentleitner closed 4 years ago
A very nice alternative is iPython!
Install it via pip:
python3 -m pip install jupyter --upgrade
And run example_interactive_mode.
Wait a few seconds and then type "ubwa." and press tab tab ...
All you need to active this shell is this code in your file:
import IPython
...
IPython.embed()
Its even possible to create a webinterface easily and submit commands: http://ipython.org/ipython-doc/stable/notebook/public_server.html
More Infos: https://ipython.org/ipython-doc/stable/interactive/reference.html#embedding
I added some methods for a better experience in iPython: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/60#issuecomment-625549948
Some things are not working as expected and need modifications. If you find methods that need modifications please open a new issue.
Is your feature request related to a problem? Please describe.
print_summary()
needs some CPU power and calling it every second even not needed is a waste of cpu power on small servers.Having a interactive console with short commands that get suggested on writing and selectable via tab could be a nice way to interact with the websocket lib.
Describe the solution you'd like A method to call instead of
print_summary()
and its waiting for an console input. Here it should be possible so write a short command likehelp
andshow
which triggers one output ofprint_summary()
. This could be some kind of interactive console with much more commands added later and some kind of code hinting and a list ofstream_id
s to choose comfortable.Describe alternatives you've considered
Additional context