For example:
$ python -me 1 + 1 2
Like python -c but no need for a print. But wait, there’s more.
As a bonus, if the first argument is a module name then it will output the location of the module source code:
$ python -me os /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/os.py
If you follow the name of the module with a command then the module will be opened with that command. For example, the following will open the os module source in vim:
$ python -me os vim
The “e” module recognises the special command names “edit” and “view” which will result in it looking up your editor and viewer commands in the environment variables $EDITOR and $PAGER respectively. The latter defaults to “less”. This is slightly easier than writing, for example:
$ vim `python -me os`
… especially if you’re going back to edit a previous “python -me” command using line editing.
Also, “python -me help” is a shortcut to Python’s interactive help mechanism.
Idea from Georg Brandl. Foolishly implemented by Michael Foord and Richard Jones.
Metadata
Release files for e 1.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| e-1.4.5.tar.gz | 1.8 kB | Without provenance | Details for e-1.4.5.tar.gz |
Release files / e-1.4.5.tar.gz
| Download URL | e-1.4.5.tar.gz |
|---|---|
| Size | 1.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ce64149fd260237e8f53d5b4863466875594e77341ec47d340c0d2c6d3b5942
|
|
BLAKE2b-256 checksum How to use checksums |
79198bdbb33a50c0a76eac690ecad9add56e1de1b08c657ac0faa862b7662be6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for e 1.4.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.