Questions tagged [interactive]

Interactive software accepts and responds to input from humans, in contrast to noninteractive software, which operate without human contact.

1873 questions
578
votes
13 answers

Interactive shell using Docker Compose

Is there any way to start an interactive shell in a container using Docker Compose only? I've tried something like this, in my docker-compose.yml: myapp: image: alpine:latest entrypoint: /bin/sh When I start this container using docker-compose…
drubb
  • 14,533
  • 7
  • 15
  • 11
309
votes
24 answers

How can I start an interactive console for Perl?

How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python?
ibz
  • 44,461
  • 24
  • 70
  • 86
188
votes
2 answers

Read password from stdin

Scenario: An interactive CLI Python program, that is in need for a password. That means also, there's no GUI solution possible. In bash I could get a password read in without re-prompting it on screen via read -s Is there something similar for…
Boldewyn
  • 81,211
  • 44
  • 156
  • 212
172
votes
5 answers

Passing arguments to an interactive program non-interactively

I have a bash script that employs the read command to read arguments to commands interactively, for example yes/no options. Is there a way to call this script in a non-interactive script passing default option values as arguments? It's not just one…
sidharth sharma
  • 3,025
  • 6
  • 23
  • 20
147
votes
8 answers

Is there a way to squash a number of commits non-interactively?

I'm trying to squash a range of commits - HEAD to HEAD~3. Is there a quick way to do this, or do I need to use rebase --interactive?
Phillip
  • 5,366
  • 10
  • 43
  • 62
137
votes
7 answers

How to drop into REPL (Read, Eval, Print, Loop) from Python code

Is there a way to programmatically force a Python script to drop into a REPL at an arbitrary point in its execution, even if the script was launched from the command line? I'm writing a quick and dirty plotting program, which I want to read data…
dsimcha
  • 67,514
  • 53
  • 213
  • 334
98
votes
13 answers

git add --interactive "Your edited hunk does not apply"

I'm trying to use git add --interactive to selectively add some changes to my index, but I continually receive the "Your edited hunk does not apply. Edit again..." message. I get this message even if I choose the e option, and immediately…
Josh
  • 2,077
  • 1
  • 17
  • 21
94
votes
1 answer

How to assign the result of the previous expression to a variable?

Suppose I'm using R's interactive console, and I've just done something like this: long_running_command() That long-running command returns a value, and I've just realized that I wanted to assign that value to a variable instead of discard it. So…
Ryan C. Thompson
  • 40,856
  • 28
  • 97
  • 159
75
votes
16 answers

What are the available interactive languages that run in tiny memory?

I am looking for general purpose programming languages that have an interactive (live coding) prompt work in 32 KB of RAM by itself or 8 KB when the compiler is hosted on a separate machine run on a microcontroller with as little as 8-32 KB RAM…
dwhall
  • 657
  • 1
  • 8
  • 13
74
votes
7 answers

Interactive matplotlib plot with two sliders

I used matplotlib to create some plot, which depends on 8 variables. I would like to study how the plot changes when I change some of them. I created some script that calls the matplotlib one and generates different snapshots that later I convert…
Open the way
  • 26,225
  • 51
  • 142
  • 196
74
votes
6 answers

Is there a possibility to execute a Python script while being in interactive mode

Normally you can execute a Python script for example: python myscript.py, but if you are in the interactive mode, how is it possible to execute a Python script on the filesystem? >>> exec(File) ??? It should be possible to execute the script more…
lennykey
  • 1,195
  • 2
  • 12
  • 25
70
votes
7 answers

Tell if Python is in interactive mode

In a Python script, is there any way to tell if the interpreter is in interactive mode? This would be useful so that, for instance, when you run an interactive Python session and import a module, slightly different code is executed (for example,…
Chinmay Kanchi
  • 62,729
  • 22
  • 87
  • 114
68
votes
7 answers

Enter Interactive Mode In Python

I'm running my Python program and have a point where it would be useful to jump in and see what's going on, and then step out again. Sort of like a temporary console mode. In Matlab, I'd use the keyboard command to do this, but I'm not sure what the…
Richard
  • 56,349
  • 34
  • 180
  • 251
65
votes
5 answers

How to convert string to integer in UNIX shelll

I have d1="11" and d2="07". I want to convert d1 and d2 to integers and perform d1-d2. How do I do this in UNIX? d1 - d2 currently returns "11-07" as result for me.
qwarentine
  • 1,003
  • 2
  • 9
  • 7
63
votes
4 answers

Is there an interactive graphing library for python

I'm looking for an interactive graphing library for Python. By "graph", I meant a set of nodes connected by a set of vertices (not a plot of values over x-y axis, nor a grid of pixels). By "interactive", I meant I can drag-and-drop the nodes around…
Lie Ryan
  • 62,238
  • 13
  • 100
  • 144
1
2 3
99 100