-
Notifications
You must be signed in to change notification settings - Fork 43
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
Almost working on Windows :) #261
Comments
Hi! Thanks for testing it out on Windows! If there are no major issues I think we can make some changes as you suggested to support Windows at least on some level. If you're willing to submit a PR that would be very welcome :) |
Windows 7. Suplemon does not work for me as follows $ pip3 install suplemon
Collecting suplemon
Downloading Suplemon-0.2.1.tar.gz (61 kB)
|████████████████████████████████| 61 kB 1.5 MB/s
Collecting pygments
Downloading Pygments-2.8.1-py3-none-any.whl (983 kB)
|████████████████████████████████| 983 kB 2.2 MB/s
Collecting wcwidth
Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Using legacy 'setup.py install' for suplemon, since package 'wheel' is not installed.
Installing collected packages: wcwidth, pygments, suplemon
Running setup.py install for suplemon ... done
Successfully installed pygments-2.8.1 suplemon-0.2.1 wcwidth-0.2.5
$ suplemon 123.txt
Traceback (most recent call last):
File "C:\Python\Scripts\suplemon-script.py", line 33, in <module>
sys.exit(load_entry_point('Suplemon==0.2.1', 'console_scripts', 'suplemon')())
File "c:\python\lib\site-packages\suplemon\cli.py", line 36, in main
if app.init():
File "c:\python\lib\site-packages\suplemon\main.py", line 108, in init
self.ui.init()
File "c:\python\lib\site-packages\suplemon\ui.py", line 123, in init
termenv = os.environ["TERM"]
File "c:\python\lib\os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: 'TERM' |
All the windows issues have been resolved in this fork: https://github.com/bagage/suplemon |
$ python --ver && pip3 install suplemon
Python 3.8.8
$ suplemon hello.txt
Traceback (most recent call last):
File "C:\Python\Scripts\suplemon-script.py", line 33, in <module>
sys.exit(load_entry_point('Suplemon==0.2.1', 'console_scripts', 'suplemon')())
File "c:\python\lib\site-packages\suplemon\cli.py", line 36, in main
if app.init():
File "c:\python\lib\site-packages\suplemon\main.py", line 108, in init
self.ui.init()
File "c:\python\lib\site-packages\suplemon\ui.py", line 123, in init
termenv = os.environ["TERM"]
File "c:\python\lib\os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: 'TERM' |
Ah, that name on PyPI.org is the original unpatched version. To install bagage's version:
That should install the downloaded version in place of the PyPI version. Nice thing is you can edit the files and run the install again to update the package locally. You can also run the editor without using setup.py by running suplemon.py in the root directory. |
@scott91e1, sorry, but it’s too buggy, the quality bar has dropped extremely low. $ python suplemon.py
2021-04-11 13:44:12,270 - suplemon.config - INFO - Failed to load config file 'C:\Users\***\.config\suplemon\suplemon-config.json'.
2021-04-11 13:44:12,453 - suplemon.module_loader - ERROR - Failed loading module: crypt
Traceback (most recent call last):
File "C:\Python\Scripts\suplemon\suplemon\module_loader.py", line 66, in load_single
mod = imp.load_source(name, path)
File "C:\Python\lib\imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Python\Scripts\suplemon\suplemon\modules\crypt.py", line 5, in <module>
from Crypto import Random
ModuleNotFoundError: No module named 'Crypto'
2021-04-11 13:44:12,645 - suplemon.module_loader - ERROR - Failed loading module: system_clipboard
Traceback (most recent call last):
File "C:\Python\Scripts\suplemon\suplemon\module_loader.py", line 66, in load_single
mod = imp.load_source(name, path)
File "C:\Python\lib\imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Python\Scripts\suplemon\suplemon\modules\system_clipboard.py", line 7, in <module>
import pyperclip
ModuleNotFoundError: No module named 'pyperclip' |
both of those import errors are coming from optional modules, you can remove the modules or run:
if you find this frustrating then nano is available on windows via the choco package mananger:
and I disagree about the quality of suplemon, the project runs really well on windows with a small number of modifications. Why are you interesting in this project if you cannot figure out how to fix Python import issues? |
Hi,
I saw in #101 that you don't intend to support Windows, nonetheless I tried to use it at work and it almost works! If you're OK with it, I can list issues and maybe submit a PR for that:
windows-curses
curses.init_pair(0, curses.COLOR_BLACK, bg)
raises an exception on windows. Not sure what this code is for, but for now I commented that code. A warningEnhanced colors failed to load
appears everytime I quit. curses.init_pair(0) raises ERR zephyrproject-rtos/windows-curses#10os.environ["TERM"]
to always be present but that's not the case on Windows. Maybe we could useos.environ.get("TERM", "")
instead?windows-curses
but it never returns keycode,backspace
hasord()=8
similarly toctrl+h
hence the help toggle. chr() returns same value for ctrl+h and backspace zephyrproject-rtos/windows-curses#9[enter]
inserts a new space instead of a new line (it behaves like[space]
). --> actually no,key_mappings.py
must be updated to support^M
to behave like\n
.Crypto
module.You have to installI actually managed to make suplemon happy:pip install pycrypto
but it requires VisualStudio build tools that I cannot install since I am not admin on my machine. I'll test on another machine for this.pip uninstall crypto ; pip install pycryptodome
.If interested, I'll continue my investigation to see what's working and what's not in the upcoming days.
Thanks!
The text was updated successfully, but these errors were encountered: