pick icon indicating copy to clipboard operation
pick copied to clipboard

added `position` argument so `pick` doesn't clear the screen every time

Open Cornelius-Figgle opened this issue 2 years ago • 0 comments

#94 #50 I have added the position argument to the pick module, so that a specific write-point can be provided. This means that pick won't clear the screen when running in an existing curses window

position is a dictionary with the keys y0 and x0, which correspond to the y and x locations respectively. Default position is the same as previously, now written as {"y0": 1, "x0": 1}

Forked repo here

y_, _ = screen.getyx()
answer, _ = pick(
    ['Yes', 'No'], 
    f'\nIs This Path Correct? \t{path}',
    screen=screen,
    position={'y0': y_, 'x0': 0}
)

Cornelius-Figgle avatar Dec 24 '22 11:12 Cornelius-Figgle