Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic CLI support for windows OS #94

Open
guptaaastha opened this issue May 19, 2021 · 26 comments
Open

Dynamic CLI support for windows OS #94

guptaaastha opened this issue May 19, 2021 · 26 comments
Labels
enhancement New feature or request

Comments

@guptaaastha
Copy link
Contributor

Currently Dynamic CLI has a dependency on the termios module. This module does not support windows OS (refer the links provided below for reference). This issue is to point attention towards this drawback and open up a conversation whether this is something that can be addressed.

Please refer:
https://docs.python.org/3/library/tty.html
https://docs.python.org/3/library/termios.html#module-termios

@github-actions
Copy link

Hi👋 thanks for creating your first issue for IOSF, Will get back to you soon !.

@NamamiShanker
Copy link
Member

This dependency has been caused because of the simple-term-menu module. We need this module for StackExchange results to be printed the way they are. Please refer to PR #89. Windows users can use WSL for using Dynamic-CLI.

@guptaaastha
Copy link
Contributor Author

One can surely use WSL but that would make Dynamic CLI restrictive and available only for users who are on Unix OS. I think we should try to be more inclusive and find alternatives that support all users regardless of their OS 😄

@lainq
Copy link
Contributor

lainq commented May 19, 2021

Yes @guptaaastha, the cli is not supporting windows right now due to the termios package used in the application. The module is not yet implemented for windows. We are searching for a way to solve this issue. All contributions are appreciated.

@NamamiShanker
Copy link
Member

We can use curses but that can reduce UI/UX capabilities.

@lainq
Copy link
Contributor

lainq commented May 19, 2021

We can use curses but that can reduce UI/UX capabilities.

Hmm yeah

@lainq
Copy link
Contributor

lainq commented May 19, 2021

Right now, I am planning to use an online linux environment like repl.it or CS50 IDE.

@guptaaastha
Copy link
Contributor Author

Right now, I am planning to use an online linux environment like repl.it or CS50 IDE.

That's one way to go yes, I think we should still be on the look for a more inclusive module 🚀

@GouravSardana
Copy link
Member

I think we can do specific change only for windows env. So that other would not face UX issues.

@GouravSardana
Copy link
Member

Or else we need to find out some other way to support all the environment equally and efficiently.

@lainq
Copy link
Contributor

lainq commented May 19, 2021

Or else we need to find out some other way to support all the environment equally and efficiently.

I think this is what we have to do

@GouravSardana
Copy link
Member

I'll do a research and find any alternative. You guy's can also search, If you find anything do let me know here.

@lainq lainq pinned this issue May 20, 2021
@lainq lainq added the enhancement New feature or request label May 20, 2021
@GouravSardana
Copy link
Member

This is quite useful. You guys can also take a look. 2-3 people gave suggestions regarding the same problem that we are facing - bchao1/bullet#2

@lainq
Copy link
Contributor

lainq commented May 22, 2021

This is quite useful. You guys can also take a look. 2-3 people gave suggestions regarding the same problem that we are facing - bchao1/bullet#2

But, they don't have a solution for that 🙁

@GouravSardana
Copy link
Member

They have but that was specific to windows only. Still searching for some other alternative

@guptaaastha
Copy link
Contributor Author

Let's be on the lookout for solutions

@lainq
Copy link
Contributor

lainq commented May 22, 2021

#97

@GouravSardana
Copy link
Member

@pranavbaburaj i think you wrote wrong. It's not support for windows and by mistake you wrote it only supports for windows

@guptaaastha
Copy link
Contributor Author

@pranavbaburaj i think you wrote wrong. It's not support for windows and by mistake you wrote it only supports for windows

I just noticed this too, @pranavbaburaj please correct it.

@lainq
Copy link
Contributor

lainq commented May 22, 2021

I have updated it, Thank you 🙂

@GouravSardana
Copy link
Member

We can use this as a backup option for windows- https://github.com/aegirhall/console-menu

@lainq
Copy link
Contributor

lainq commented Jun 18, 2021

Hmm, but we will have to rewrite it entirely or reimplement it for windows 🤔

@GouravSardana
Copy link
Member

Fow now should we only integrated it when OS is windows ?

@lainq
Copy link
Contributor

lainq commented Jun 18, 2021

Fow now should we only integrated it when OS is windows?

Yeah, We first check if the platform is windows, then create this interface for windows

@GouravSardana
Copy link
Member

@pranavbaburaj Yes, This can be done but this would be temp. We have to migrate the whole things to something else

@Manas1820
Copy link
Member

Manas1820 commented Mar 10, 2022

There is a workaround to make it work on window

if os.name == "nt":
  import msvcrt
else:
  import terminos

That is we can check if the current os the user is on is windows or not if we found its windows import msvcrt and replace the same functionalities which are done using terminos . @GouravSardana @pranavbaburaj this solution should work and looks like the only workaround rn.

Moreover the dependency due to which the error occurs i.e simple-term-menu this can be referred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants