I have ipython
with qtconsole
installed and can start it via ipython qtconsole
. I can also run a script via ipython -i my_script.py
to stay in the interactive interpreter after the script finishes or if an exception is thrown. But I could not figure out how to combine them: I would like to do ipython -i qtconsole my_script.py
but whatever I try, it complains about invalid flags. Any hint how to do that?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Interesting, it seems that either this option was forgotten or not wanted in the qtconsole. A way around this (or perhaps an intended way?) is to use the
-m
flag. This runs a module as a script so you if you called:it will run the code in
my_script
, for me this works. Notice it needs to bemy_script
notmy_script.py
otherwise it will throw an error since it's looking for the module not the file. Hope that helps.