aisk / pick

create curses based interactive selection list in the terminal
MIT License
722 stars 61 forks source link

Script Crashes when Opened via CMD #66

Closed LopeKinz closed 2 years ago

LopeKinz commented 2 years ago

i made a small script to add extentions to my project.

it works perfectly in vs code but crashes in CMD.

here is my code

from pick import pick
import os
from os import listdir
from os.path import isfile, join
try:
    title = "ColdOS Extentions"
    options = [f for f in listdir("Extentions/") if isfile(join("Extentions/", f))]
    selection = pick(options, title, indicator='=>', default_index=0)
    assert len(selection) == 1
    option, index = selection[0]
    os.system("python Extentions/" + option)
except Exception as e:
    print(e)
wong2 commented 2 years ago

Is there any error report?

ZackeryRSmith commented 2 years ago

This project uses Curses which as far as I know only works on Unix/POSIX systems. Not windows

wong2 commented 2 years ago

No, it works on windows with the help of windows-curses

wong2 commented 2 years ago

Please reopen with more information.