Python programming language utils library.
-
Array. Tiny module to work with Python array.
import pyutils.array as array full_array = [1, 2, 3, 4, 5] empty_array = [] # Returns 5 last = array.last(full_array) # Returns False is_empty = array.is_empty(full_array) # Returns True is_elements = array.is_elements(full_array) # Returns None last = array.last(empty_array) # Returns True is_empty = array.is_empty(empty_array) # Returns False is_elements = array.is_elements(empty_array)
-
CSVUtil. Tiny module to work with csv file.
import pyutils.csvutils as csv // Load csv path = "1.txt" // Load 1.txt csv array. c = csv.load(path) // Load 1.txt csv file as dictionary array. c = csv.load_dictionary(path)
-
File. Tiny module to work with file.
import pyutils.file as file path = "data/text/file.txt" // Returns file.txt name = file.name_from_path(path) // Returns txt extension = file.name_from_path(path)
-
Folder. Tiny module to work with dictionary.
folder / 1.txt 2.txt a / import pyutils.folder as folder // Returns ["1.txt", "2.txt", "a"] content = folder.content("folder/")
$ git clone https://github.com/damonthecricket/pyutils.git