Start ipython qtconsole as interactive interpreter after script execution

Achim

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?

Greg

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:

ipython qtconsole -m my_script

it will run the code in my_script, for me this works. Notice it needs to be my_script not my_script.py otherwise it will throw an error since it's looking for the module not the file. Hope that helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Start ipython qtconsole as interactive interpreter after script execution

From Dev

IPython startup script: Check if QtConsole

From Dev

Getting Ipython QtConsole's current config infomation in it's interactive shell

From Dev

python, ipython run interactive script

From Dev

Anaconda ipython qtconsole launcher

From Dev

ipython Qtconsole - conflicting keybinding

From Dev

Error loading ipython qtconsole

From Dev

Why is IPython QtConsole not launching?

From Dev

Displaying an Image in the iPython qtconsole

From Dev

Delay execution of Python script after system start up

From Dev

ipython 5.1 export interactive session to script

From Dev

Choose interpreter after script start e.g. if/else inside hashbang

From Dev

Choose interpreter after script start e.g. if/else inside hashbang

From Dev

How do I start ipython's qtconsole cleanly on Win7

From Dev

IPython QtConsole: select text to copy?

From Dev

embedding ipython qtconsole and passing objects

From Dev

Launch ipython qtconsole on a specific environnement

From Dev

How to remain in python interactive interpreter after running program?

From Dev

How to remain in python interactive interpreter after running program?

From Dev

IPython | Unix commands not working in script but working in command line interpreter

From Dev

Run interactive script at system startup, or start interactive user session (Windows)

From Java

Thread execution after .start() method

From Dev

Thread execution after .start() method

From Dev

Howto start an interactive script at ubuntu startup?

From Dev

Backslash in interactive interpreter

From Dev

Failed to change font size in ipython qtconsole

From Dev

Enabling vi key bindings in IPython qtconsole

From Dev

Changing the IPython interpreter

From Dev

Interactive Ipython Notebooks on Heroku

Related Related

  1. 1

    Start ipython qtconsole as interactive interpreter after script execution

  2. 2

    IPython startup script: Check if QtConsole

  3. 3

    Getting Ipython QtConsole's current config infomation in it's interactive shell

  4. 4

    python, ipython run interactive script

  5. 5

    Anaconda ipython qtconsole launcher

  6. 6

    ipython Qtconsole - conflicting keybinding

  7. 7

    Error loading ipython qtconsole

  8. 8

    Why is IPython QtConsole not launching?

  9. 9

    Displaying an Image in the iPython qtconsole

  10. 10

    Delay execution of Python script after system start up

  11. 11

    ipython 5.1 export interactive session to script

  12. 12

    Choose interpreter after script start e.g. if/else inside hashbang

  13. 13

    Choose interpreter after script start e.g. if/else inside hashbang

  14. 14

    How do I start ipython's qtconsole cleanly on Win7

  15. 15

    IPython QtConsole: select text to copy?

  16. 16

    embedding ipython qtconsole and passing objects

  17. 17

    Launch ipython qtconsole on a specific environnement

  18. 18

    How to remain in python interactive interpreter after running program?

  19. 19

    How to remain in python interactive interpreter after running program?

  20. 20

    IPython | Unix commands not working in script but working in command line interpreter

  21. 21

    Run interactive script at system startup, or start interactive user session (Windows)

  22. 22

    Thread execution after .start() method

  23. 23

    Thread execution after .start() method

  24. 24

    Howto start an interactive script at ubuntu startup?

  25. 25

    Backslash in interactive interpreter

  26. 26

    Failed to change font size in ipython qtconsole

  27. 27

    Enabling vi key bindings in IPython qtconsole

  28. 28

    Changing the IPython interpreter

  29. 29

    Interactive Ipython Notebooks on Heroku

HotTag

Archive