passhole
passhole copied to clipboard
Windows Support?
Hi, I have to use ph
in Windows. Would it be supported in that env? I am getting no module named readline
error.
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 + ': ')
Thank you @Evidlo. Good workaround.
I'll keep this open for now, as I could just check whether we are in Windows and programmatically use the fallback method.
FYI, I installed WSL (Ubuntu) on my windows machine recently and I'm able to use passhole in that env. No Win headache.
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.
@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