python-abspath
python-abspath provides a command line tool that prints the absolute paths of all given files. File names can be piped via STDIN or given as arguments. Work for both Windows and Linux.
Install
pip install python-abspath
Installed Command Line Tools
- abspath
Usage
C:\Code\python-abspath>abspath --help
Usage: abspath.py [OPTIONS] [PATH]...
Options:
-q, --with-quotes
--help Show this message and exit.
Example
Example 1:
Show the absolute path of requirements.txt. requirements.txt is given as a parameter.
C:\Code\python-abspath>abspath requirements.txt
C:\Code\python-abspath\requirements.txt
Example 2:
Show the absolute path of a.txt and b.txt. a.txt and b.txt are given as parameters.
C:\Code\python-abspath>abspath a.txt b.txt
C:\Code\python-abspath\a.txt
C:\Code\python-abspath\b.txt
Example 3:
Filename or filenames can be piped via STDIN.
C:\Code\python-abspath>echo a.txt | abspath
C:\Code\python-abspath\a.txt
C:\Code\python-abspath>type filenames.txt
a.txt
b.txt
c.txt
C:\Code\python-abspath>type filenames.txt | abspath
C:\Code\python-abspath\a.txt
C:\Code\python-abspath\b.txt
C:\Code\python-abspath\c.txt
Example 4:
In window the filename seperator is "\", so you can NOT just copy the output and paste as a const value to your code. You have to add -q option, so that the output will be quoted and you can use it in you code.
C:\Code\python-abspath>abspath -q requirements.txt
"C:\\Code\\python-abspath\\requirements.txt"
Releases
v0.1.1 2020/10/27
- Add license file in release package.
v0.1.0 2020/04/09
- First release.
Release files for python-abspath 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-abspath-0.1.1.tar.gz | 3.3 kB | Details |
Release files / python-abspath-0.1.1.tar.gz
| Download URL | python-abspath-0.1.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20829905abc9bc6430d29f99bae820c3cfe8c64c7e8b0893b76a455db770b3cf
|
|
BLAKE2b-256 checksum How to use checksums |
944de3e27653906a449560863828344ba701c481378ca87589865a92366714b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.8
|