Questions tagged [npyscreen]

Npyscreen is a python widget library and application framework for programming terminal or console applications. It is built on top of `ncurses`, which is part of the standard library.

Npyscreen is a python widget library and application framework for programming terminal or console applications. It is built on top of ncurses, which is part of the standard library.

Homepage: http://npyscreen.readthedocs.io

30 questions
0
votes
2 answers

I cannot make safe_to_exit method in npyscreen work

I think I missing something very basic but I cannot make this function work. I am running python 3.6.12 on Redhat with npyscreen 4.10.5. My expectation is that the safe_to_exit function could be used to validate any input immediately when the user…
flyboy
  • 21
  • 2
0
votes
1 answer

How do I detect when a button is selected in npyscreen?

Right now, I am trying to make stylophone application in Python using npyscreen. What I'm trying to achieve, is to detect whenever a button is selected but not pressed. If you don't quite understand my goal, maybe this example will describe it…
Kazafka
  • 17
  • 5
0
votes
1 answer

What is the difference between NPSApp and StandardApp on npyscreen?

I need to create a Python CLI application using npyscreen, but the documentation is not clear how to create a UI app. My app will have a one controller, one service layer and a main script. In the main script I call the controller and the controller…
e-info128
  • 3,727
  • 10
  • 40
  • 57
0
votes
0 answers

npyscreen Change Value of widget dynamicly

the situation is like this: My App is running in a diffrent thread and the main program in another. I want to change values in my npyscreen widgedts from the main screen. I heard about events, but for some reasons the example code does not…
TwoStone
  • 16
  • 2
0
votes
1 answer

Parse self as list, not string

Still trying to figure out this code im building and make it work cross-platform. I have a couple defining factors, that the code in question references, so I will input them all. self.mainFile = r"\SYS64" self.dir_path =…
sp0rka
  • 49
  • 9
0
votes
1 answer

Running a function or BASH command after exiting npyscreen

I'm trying to run a function after entering in npyscreen, tried a few things and am still stuck. Just exits npyscreen and returns to a bash screen. This function is supposed to start a watchdog/rsync watch-folder waiting for files to backup.…
Axel Foley
  • 29
  • 7
0
votes
2 answers

Python npyscreen: How to launch form from button press?

I've googled, read the docs (kinda hard for me to understand), googled some more, looked at examples, and I just can't find an answer. Maybe there is no way to do it. self.button = self.add(npyscreen.Button, name="Button") This produces a button…
John
  • 976
  • 1
  • 15
  • 21
0
votes
1 answer

(Npyscreen) How to implement functions into picking widget?

I have an issue with npyscreen application, which implicitly will be able to turning off or rebooting entire LAN (small project for my teacher). I have created picking widget with two test functions in order to check if app works correctly: def…
ca.ribou
  • 39
  • 10
0
votes
0 answers

How can i call a function inside a function inside a class?

I have a problem here in the code there is a function inside a function inside a class and I can't find a way to run the second function. class startFunctionButton(npyscreen.ButtonPress): def whenPressed(self): IPScanForm.returnData ###…
tester
  • 13
  • 2
0
votes
1 answer

npyscreen - addVisibleWhenSelected - Clearing value when hidden

I'm quite new to python and I'm trying to put together a little app with npyscreen. Part of this app has a page with a FormControlBox, that reveals a FormControlBox when selected. This second FormControlBox, when selected, reveals some text…
J. Valerio
  • 13
  • 6
0
votes
0 answers

npyscreen doesn't seem to have installed properly using PIP. How do I get it installed properly?

I'm trying to install npyscreen to my Python 3.6.3 installation. I used PIP and it seemed to work. However when I run a program with import npyscreen I get this error: Traceback (most recent call last): File "E:\Python\test.py", line 1, in…
0
votes
1 answer

npyscreen - switchForm(formid) error

I am using npyscreen and i would like to understand how the switchForm method works. I did a small example that I took from the documentation and from this question (that didn't answer my question). My Code: import npyscreen import sys class…
jerem0808
  • 95
  • 1
  • 12
0
votes
2 answers

npyscreen - displaying the current time in a FixedText widget?

I'm trying to display the time in a FixedText widget in an NPSAppManaged application. So far I've got this: import npyscreen import datetime import threading from time import sleep class MainForm(npyscreen.Form): def create(self): …
cjm2671
  • 18,348
  • 31
  • 102
  • 161
-1
votes
1 answer

Why is junk data appearing in my Python's subprocess stdout?

I'm writing a Python app that runs a command on an AWS remote docker container, and saves the output to a file. The command that is being run remotely is generating binary data (a database dump). The app works great if I start the download and don't…
John
  • 2,551
  • 3
  • 30
  • 55
-1
votes
1 answer

Display properly output messages using npyscreen

I have an script that collects initial information using npyscreen and then display multiple messages as it progresses. However, these messages are displayed in an unorganized way (see below). Is there a way to populate those messages in the correct…
Alex
  • 11
  • 4
1
2