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

Windows Support? #52

Open
azinsharaf opened this issue Mar 3, 2022 · 6 comments
Open

Windows Support? #52

azinsharaf opened this issue Mar 3, 2022 · 6 comments

Comments

@azinsharaf
Copy link

Hi, I have to use ph in Windows. Would it be supported in that env? I am getting no module named readline error.

@Evidlo
Copy link
Owner

Evidlo commented Apr 22, 2022

As of right now, it's not technically supported since GNU readline doesn't exist on Windows. However you should be able to hack in a workaround pretty easily.

Just delete the import readline at the top of passhole.py, then change the editable_input() function to this:

def editable_input(prompt, prefill=None):
    return input(prompt + ': ')

@azinsharaf
Copy link
Author

Thank you @Evidlo. Good workaround.

@Evidlo
Copy link
Owner

Evidlo commented May 2, 2022

I'll keep this open for now, as I could just check whether we are in Windows and programmatically use the fallback method.

@Evidlo Evidlo reopened this May 2, 2022
@azinsharaf
Copy link
Author

azinsharaf commented Sep 15, 2022

FYI, I installed WSL (Ubuntu) on my windows machine recently and I'm able to use passhole in that env. No Win headache.

@approximate
Copy link

approximate commented Feb 23, 2023

After patching the passhole.py as suggested aove, passhole v.1.10.0 fails under Windows when trying to import transitive dependency pwd. The dependency path: passhole -> pykeepass_cache -> daemon -> pwd.

pwd is a Unix-only module and does not exist on Windows, python-daemon looks Unix-only as well.

Is there any way to to make daemon requirement optional/conditional?

(edit) This was verified on Windows 10 under PowerShell, CMD and Git Bash. Under WSL everything works just fine, as mentioned in an earlier comment.

@Evidlo
Copy link
Owner

Evidlo commented Jan 31, 2024

@approximate Sorry for the slow response. You might try with the --no-cache option, as I'm guessing the error is being thrown inside pykeepass_cache.

python-daemon is just used to run the cache server in the background. There might be a more cross-platform way to achieve this though: https://stackoverflow.com/questions/1196074/start-a-background-process-in-python

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

No branches or pull requests

3 participants