pex-tool / pex

A tool for generating .pex (Python EXecutable) files, lock files and venvs.
https://docs.pex-tool.org/
Apache License 2.0
2.84k stars 266 forks source link

Add PEX info to the PEX repl. #2496

Closed jsirois closed 3 months ago

jsirois commented 3 months ago

It should now be clear when you've dropped into a PEX repl (vs. a plain Python repl). This may help stem some of the confusion brough about by running pex with no arguments. In addition, you gain some introspection capabilities via the pex_info REPL command.

Fixes #157

jsirois commented 3 months ago

For the #157 OP case of running a PEX pex with no args: image

And the more general case of a normal PEX repl built via:

:; pex --interpreter-constraint ">=3.8" --pip-version latest requests --sh-boot -orequests.pex

image

jsirois commented 3 months ago

Reviewers, another big one - but broken up into its bits anyhow. Thanks in advance.

This will probably be the last of these. It's not clear to me review makes much sense anymore except when I actually have questions you might help answer. I don't really like lobbing these things at you guys and I'm sure you don't enjoy being lobbed at.

benjyw commented 3 months ago

Reviewers, another big one - but broken up into its bits anyhow. Thanks in advance.

This will probably be the last of these. It's not clear to me review makes much sense anymore except when I actually have questions you might help answer. I don't really like lobbing these things at you guys and I'm sure you don't enjoy being lobbed at.

I am happy to do any code reviews that are actually useful to you! Or when you think it might improve something. But just rubber-stamping makes little sense, I agree.