pipenv run python -m worked for me for starting sub-shells provided by python libraries.Removing shell=True in pipenv.shell._handover alongside using:.python -m pipenv shell worked for me (had to not use "pipenv.exe" at all for command history in the shell).So I'm guessing from my testing that if a process sits between the invoking process and the currently active child process it screws up command history, because I'd also loose my command history if I used scrapy's native scrapy.exe from Python's Scripts folder (like pipenv.exe) inside the pipenv shell so I also have to use python -m scrapy shell in order to test the shell, same would happen for pipenv run so making me have to use pipenv run python -m scrapy shell. It'd start it as just "cmd.exe" without the parent cmd.exe and when I invoked python from the pipenv shell then my command history worked for python! And across multiple starts and stops from within the same shell instance! Not sure if that's the best way to invoke the shell yet, but it worked. Sys.exit(subprocess.call(args, universal_newlines=True)) Sys.exit(subprocess.call(args, shell=True, universal_newlines=True))
WHY WONT MY UP AND DOWN ARROWS WORK CODE
So I did some more digging and testing and noticed that when the pipenv shell is started it's done so as "C:\Windows\System32\cmd.exe" /c "cmd.exe" with cmd.exe as a child process so I dug through the code and when I edited the function pipenv.shell._handover replacing:
WHY WONT MY UP AND DOWN ARROWS WORK .EXE
exe ( pipenv shell) and did it using python's module execution ( python -m pipenv shell) I'm able to use my command history correctly inside the pipenv shell, though I don't have command history for python if I invoke it from within the pipenv. I found that if instead of invoking pipenv through its. I also included some snapshots of the process hierarchy during my testing to help explain. Hi guys, having the same issue with pipenv on my machine (Windows 10 1903/pipenv 2018.11.26) but I played around with it today and noticed some things while trying to get command history working for my personal scrapy project for when I use scrapy's shell from within a pipenv ( pipenv scrapy shell ""). Let me know if I should try another branch. I tried it with an existing virtualenv and a newly recreated one. Successfully installed pipenv-2018.7.1.dev0
Requirement already satisfied: virtualenv in c:\\python36\lib\site-packages (from pipenv=2018.7.1.dev0) (16.0.0) Requirement already satisfied: virtualenv-clone>=0.2.5 in c:\\python36\lib\site-packages (from pipenv=2018.7.1.dev0) (0.3.0) Requirement already satisfied: certifi in c:\\python36\lib\site-packages (from pipenv=2018.7.1.dev0) (2018.4.16)
In the script below, some lines wrap around to the next line.