Small utils for Python
Project description
utilspy
Small utils for python
Installation
Package Installation from PyPi
$ pip install utilspy-g4
Package Installation from Source Code
The source code is available on GitHub.
Download and install the package:
$ git clone https://github.com/Genzo4/utilspy
$ cd utilspy
$ pip install -r requirements.txt
$ pip install .
Utils
-
addExt
Add ext to path.
Support Windows and Linux paths.
from utilspy_g4 import addExt
path = '/test/test.png'
ext = '2'
newPath = addExt(path, ext) # newPath = '/test/test.2.png'
-
compareFrames
Compare 2 frames.
from utilspy_g4 import compareFrames
is_equal = compareFrames('path_to_frame_1.png', 'path_to_frame_2.png')
-
delExt
Del ext from path.
Support Windows and Linux paths.
from utilspy_g4 import delExt
path = '/test/test.png'
newPath = delExt(path) # newPath = '/test/test'
path = '/test/test.2.png'
newPath = delExt(path) # newPath = '/test/test.2'
path = '/test/test.2.png'
newPath = delExt(path, 2) # newPath = '/test/test'
utilspy
Небольшие утилитки для Python.
Установка
Установка пакета с PyPi
$ pip install utilspy-g4
Установка пакета из исходного кода
Исходный код размещается на GitHub.
Скачайте его и установите пакет:
$ git clone https://github.com/Genzo4/utilspy
$ cd utilspy
$ pip install -r requirements.txt
$ pip install .
Утилиты
-
addExt
Добавляет дополнительное расширение файла перед его последним расширением.
Обрабатывает как Windows пути, так и Linux.
from utilspy_g4 import addExt
path = '/test/test.png'
ext = '2'
newPath = addExt(path, ext) # newPath = '/test/test.2.png'
-
compareFrames
Сравнение двух кадров (изображений).
from utilspy_g4 import compareFrames
is_equal = compareFrames('path_to_frame_1.png', 'path_to_frame_2.png')
-
delExt
Удаляет одно или несколько расширений файла
Обрабатывает как Windows пути, так и Linux.
from utilspy_g4 import delExt
path = '/test/test.png'
newPath = delExt(path) # newPath = '/test/test'
path = '/test/test.2.png'
newPath = delExt(path) # newPath = '/test/test.2'
path = '/test/test.2.png'
newPath = delExt(path, 2) # newPath = '/test/test'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
utilspy_g4-1.2.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for utilspy_g4-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74422fd0498f82522b21a000ef95f4f3613db4085f18079a8b62d7ebcd781816 |
|
MD5 | 7f2338d11e6677b78beaff302194cc24 |
|
BLAKE2b-256 | f4db4c71f070b11aef2bf8e0da9d495c1a0b18a8759a4c10c067cc405fc6814f |