Git Product home page Git Product logo

whiptail's Introduction

Hi there ๐Ÿ‘‹

Dom's GitHub stats
Top Languages

My Projects

whiptail's People

Contributors

domdfcoding avatar marwano avatar normanras avatar pre-commit-ci[bot] avatar repo-helper[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

whiptail's Issues

Yesno returns the opposite of what we expect

Description

When using the yesno method, the results is a boolean which is actually the opposite of what described

Steps to Reproduce

  1. start a simple yesno
  2. select yes
  3. the resulting boolean is set to false

Actual result:

False

Expected result:

True

Reproduces how often:

Systematic

Version

  • Operating System: 12.3.1 MacOs
  • Python: 3.10.3
  • whiptail: 0.3.2

Installation source

PyPI/pip

Other Additional Information:

From dialog/whiptail docs: yesno return (0=yes, 1=no)

This bit of code:

return bool(self.run("yesno", msg, extra_args=[defaultno], exit_on=[255]).returncode)

should actually be:

return not bool(self.run("yesno", msg, extra_args=[defaultno], exit_on=[255]).returncode)

Support defaults for lists

Description

we cannot provide default values for checklist and radiolist as supported by whiptail

Version

  • Operating System: MacOs 12.3.1
  • Python: 3.10.3
  • whiptail: 0.3.2

Yesno does not accept values != from "no"

Description

When using the yesno method and specifying any default_value != "no" (e.g. "yes"), the prompt is not displayed

Steps to Reproduce

  1. start a simple yesno with default_value == "yes"

Actual result:

Prompt not shown

Expected result:

Prompt shown

Reproduces how often:

Systematic

Version

  • Operating System: 12.3.1 MacOs
  • Python: 3.10.3
  • whiptail: 0.3.2

Installation source

PyPI/pip

Other Additional Information:

The main run method should not add extra_args or extra_values if they are equal to empty strings

Menu msg parameter - wrapping the string or adding \n does not work as expected.

Description

For the message parameter in the menu function using "some string \n some strong" does not actually show the new line portion of the string. At the same time, for strings that are very very long, the string runs off the side of the dialog box.

I tested this in all other options/functions and both newline and wrap works as expected.

Steps to Reproduce

Add \n to the msg in menu function or create a very very long string for the menu msg.

If possible, please include a small, self-contained reproduction.
-->
Single step, see above.

Actual result:

Here are some examples:
Menu 1 No wrap
Radiolist Working Wrap
Radiolist Working New Line
Menu No New Line

Expected result:

New line or wrap of string in box

Reproduces how often:

Easily Reproduced

Version

  • Operating System: Mac 12.5.1
  • Python: 3.10.6
  • whiptail: newt 0.52.21

Installation source

VirtualEnv > Pip

Other Additional Information:

I've found the issue, fixed it locally, and will submit a PR soon. I updated all of the msg parameters in test.py, so please let me know if you'd like me to not include those extra long strings and I can resubmit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.