Questions tagged [interactive-shell]

74 questions
130
votes
2 answers

What are the differences between a login shell and interactive shell?

What is a login shell and interactive shell, and what is a .bash_profile and .bashrc?
caesar
  • 2,865
  • 11
  • 29
  • 36
39
votes
4 answers

Does MongoDB have a shell history file?

Does MongoDB have something like a .bash_history file? I recently typed in a long command, closed & re-opened the shell, and want to retrieve it. Pressing up doesn't work as it seems that the history of the last shell is not accessible in the new…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
31
votes
1 answer

Go interactive shell

Possible Duplicate: Does Go provide REPL? Does anyone know if there is an REPL (interactive go shell, similar to irb) available for go which allows the user to use import statements? I'd like to be able to do something like this: $igo import ( …
Kenny Grant
  • 9,360
  • 2
  • 33
  • 47
22
votes
4 answers

How to use the PHP interactive shell

I'm using Ubuntu 12.04 (Precise Pangolin) 64 bit, and I want to use the PHP interactive shell: php -a But it doesn't seem to work very well, and a lot of syntax is incorrectly interpreted. When I run php -a, it displays: interactive mode…
mohur
  • 1,785
  • 4
  • 16
  • 25
21
votes
1 answer

What magic prevents Tkinter programs from blocking in interactive shell?

Note: This is somewhat a follow-up on the question: Tkinter - when do I need to call mainloop? Usually when using Tkinter, you call Tk.mainloop to run the event loop and ensure that events are properly processed and windows remain interactive…
poke
  • 369,085
  • 72
  • 557
  • 602
10
votes
2 answers

Custom Interactive Shell with AutoComplete

I have been tasked to create an interactive shell to be embedded in python, such that, when called from the command line it will be dropped into that shell. Can anyone recommend me a library that does this? I would need the ability to create custom…
Adam
  • 510
  • 1
  • 5
  • 21
7
votes
2 answers

PyDev Interactive Python Shell in Eclipse

I've been using Wing IDE for python programming and I am trying to switch to Eclipse, PyDev. When I run my code in Wing IDE, after finishing the execution the console goes right back to the interactive shell and I can continue on testing, but I…
Joohwan
  • 2,374
  • 1
  • 19
  • 30
6
votes
2 answers

How to get second-to-last argument from previous bash command? (in an interactive bash shell)

How can I easily get the second-to-last (penultimate) word/argument from the previous command in a bash interactive shell? I often run commands in the background, and I would like to get the file that was specified before the &, e.g., % echo foo…
Rob Bednark
  • 25,981
  • 23
  • 80
  • 125
5
votes
3 answers

vscode ipython interactive kernel slow startup and execution

On my work laptop (with a VPN connectoin), the python extension and interactive window/kernel are starting really slow, after restarting the kernel or VSCode a few times. The download speed of the internet connection is 250mbps and the upload speed…
5
votes
1 answer

Can I "use" a namespace from a required/included file in PHP's Interactive Shell?

Suppose I run the following in a PHP interactive shell, requiring a utility function file with all code under the namespace utils: php > require_once __DIR__ . '/utils.php'; php > echo \utils\doubleMe(2); 4 php > use \utils as u; php > echo…
Samuel Ludwig
  • 111
  • 1
  • 7
5
votes
2 answers

Interact with an interactive shell script on python

I have an interactive shell application on windows. I would like to write a python script that will send commands to that shell application and read back responses. However i want to do it interactively, i.e. i want the shell application to keep…
Dor Spigel
  • 51
  • 1
  • 2
5
votes
0 answers

IPython behavior different for .py and .ipy files despite script being "pure" python (custom exception handler hook stops working)

I have written an exception handler that is meant to log all uncaught exceptions in the code before calling the normal python exception hooks. Python and iPython have slightly different ways of doing this. What i have found is that the iPython way…
Joshua M.
  • 109
  • 1
  • 4
4
votes
1 answer

Python subprocess: interacting with a shell script

I have a shell script which asks the user for too many questions. I want to answer every question that ends with : with a enter, and every question that ends with a ? with yenter. e.g., Enter your name: enter Enter your email: enter ... Are you…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
4
votes
0 answers

Executing metasploit commands using Java

I am trying to develop a UI based app in Java to use Metasploit (OS: Kali Linux). Basically I want to start a terminal and run the command "msfconsole" and then once the Metasploit Framework Console starts I want to execute commands in it. Using…
Vru26
  • 49
  • 2
4
votes
1 answer

How do I create an interactive selection?

I want to create an "interactive selection" in Python (not sure if I worded that correctly, look at the example below) that lets users press their up and down keys to choose an option and return to confirm it, then it continues with the script. An…
user1447941
  • 3,675
  • 10
  • 29
  • 34
1
2 3 4 5