Questions tagged [interactive-shell]
74 questions
0
votes
1 answer
How to create interactive PowerShell script from existing script
I've created a PS script in the past and I would like it to be more interactive.
This is the script I've created.
$csv = Import-CSV 'C:\Users\w0vlnd\Desktop\Powershells\Computers in a specific workgroup or domain.csv'
$ADprops = @(
…

Toon
- 29
- 8
0
votes
1 answer
How to capture the bytes of stdin
The goal: I want to capture all the bytes of cmd.Stdin and process them with this rot13 function: https://play.golang.org/p/VX2pwaIqhmT
The story: I'm coding a small tool which will be cross compiled for both win/ linux, so I'm trying to make it as…

hyogy
- 65
- 1
- 9
0
votes
1 answer
Is there a way to see imported modules/files from the django shell?
I have some lines of code that I use to practice django_rest_framework and I just pasted them in the python shell from python manage.py shell.
I have gotten some errors and would like to know what imports I already have.
Is there a function to…

heretoinfinity
- 1,528
- 3
- 14
- 33
0
votes
1 answer
I want to re execute the command used nth command ago and last command which name begins with m
I wanted to ree execute the command I executed nth command ago using the history command but I have no clue how to do it. and also I want to execute the last command I used which name begins with let's say 'm'.

totalNoob
- 17
- 5
0
votes
0 answers
chromedriver in headless mode does not show any textual output of the operations done
~/.pythonrc:
def get_chromedriver(headless = False):
import os
from selenium import webdriver
options = webdriver.ChromeOptions()
options.binary_location = '/usr/bin/google-chrome'
options.add_argument('user-data-dir=' +…

Mario Palumbo
- 693
- 8
- 32
0
votes
1 answer
Exit interactive prompt inside script and move to next line
Hey Im trying to print output of an interactive command to a file inside a python script and move on to next line.
I am not sure how to achieve this. I have tried:
os.system("mnamer foo.mkv > mnamer.txt")
FYI mnamer can be imported and called from…

Hani Umer
- 21
- 4
0
votes
1 answer
Why does counting down in decimals result in a xxx.9999999999999999999x?
import time
def timer():
a = 300.0
while a > 0: #stopes at 0
print(a)
time.sleep(0.11) #for roughly 100 millisecond
a = a - 0.1
timer()
I made a piece of code that counts down 1/10 per 0.100 seconds (roughly. it has…
user12969751
0
votes
0 answers
I have built an interactive shell java app. I want to test it using Junit 5
I have built an interactive java app using Scanner class. I want to test it with Junit 5.
After searching a but I wrote the test case for simulating the shell. The test case runs for the first command and remains stuck in the main method. It…

jay
- 171
- 4
- 13
0
votes
1 answer
(Blocking) interactive shell via ProcessBuilder
I built an interactive EXE which means that you can continuously send new commands to it and it will process them.
An automation of this can be implemented in Java according to this answer. However, when sending the command, the code will not wait…

BullyWiiPlaza
- 17,329
- 10
- 113
- 185
0
votes
1 answer
tf.InteractiveSession() or tf.enable_eager_execution()
This is a beginner question on learning Tensorflow. I'm used to playing around machine learning models in interactive shell like Jupyter notebook. I understand tensorflow adopts the lazy execution style, so I can't easily print tensors to check.…

F.S.
- 1,175
- 2
- 14
- 34
0
votes
0 answers
Sublime Text, Python: Interactive shell (when running build) doesnt work
I just installed sublime text and start playing with it, using python code. I dabbled with the Python.sublime.build file that contains the commands to run code.
I wanted to use "shell_cmd": "python -i \"$file\"" so that once the script has run,…

jim jarnac
- 4,804
- 11
- 51
- 88
0
votes
2 answers
Invoking a complex piped find within Emacs eshell-command
I'm trying to do something seemingly simple: create an Emacs function to create a TAGS file for me. There are simple instructions for doing this here
(defun create-tags (dir-name)
"Create tags file."
(interactive "DDirectory: ")
(eshell-command
…

T.E.D.
- 44,016
- 10
- 73
- 134
0
votes
1 answer
Autocomplete in embedded IPython
I'm using InteractiveShellEmbed from IPython.terminal.embed to embed IPython in my app. All works rigth, but autocomplete not works with modules. For example: import rand[TAB] doesn't completes to import random.
What can I do to fix this?
My code:
#…

Pablo
- 121
- 4
0
votes
3 answers
python "up-button" command completion, matlab/julia style
I recently switched from Matlab to Numpy and love it. However, one really great thing I liked about Matlab was the ability to complete commands. There are two ways that it does this:
1) tab completion. If I have a function called foobar(...), I can…

xdavidliu
- 2,411
- 14
- 33
0
votes
1 answer
Custom interactive terminal (CLI) with autocompletion on classes and objects
I would like to have an interactive prompt similar to IPython within a program.
The features I would like to have are:
Custom prompt
Auto-completion on object's methods and attributes
Execution of methods, read/write attributes
Display docstring…

nowox
- 25,978
- 39
- 143
- 293