Exahilosys / survey

A simple library for creating beautiful interactive prompts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there any way to set a default value for numerics?

RobLOlson opened this issue · comments

I'm not seeing this in the documentation, but is it possible to set a default value for numeric? For example:

count = survey.routines.numeric("Enter an integer: ", decimal=False, default=5)

Currently this produces a keyword error, i.e., it's not expecting a 'default' argument. Is there some other way?

commented

You can use value = 5 to have an initial value. Here is the numeric widget documentation which is used under the hood.

Please close this ticket if this answers your question 😊

Ah, that's what I was looking for, thanks!