A package containing local utilities for simplifying every day coding and scripting
Project description
- The motils package includes the following functions:
file_to_string(file_name): converts a file to string and returns the string
remove_commas(file_name, new_file_name=None): removes commas from a file and replaces them with newlines
zip_files(file_list, output_path): zips a list of files and returns the path to the zip file
debug(debug_string, to_debug): prints timestamp + string only if the to_debug flag is True
create_folder_if_needed(path): creates a folder if it doesn’t already exist
file_len(file_name): returns the length of the file in lines
targz_folder(folder, archive_name=None): returns a path to tar.gz folder made out of folder
write_bash_script(command_line, write_folder, script_name=”run_script.sh”): writes a bash script and returns its path
merge_two_dicts(x, y): returns a merged dictionary
is_number(s): returns True if the string is a number
I have used several of these functions in my work on a daily basis, so why not publish them?
Written by Moran Neuhof, 2017
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
Built Distribution
File details
Details for the file motils-0.1.1.tar.gz
.
File metadata
- Download URL: motils-0.1.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9565b4529df61fc0a4c9e2ceed649b1c2741c671c14d8070c293d903acf65f88 |
|
MD5 | 66c890673296e8120a2fb7b9619ccd7b |
|
BLAKE2b-256 | e4df00c47b7141109a44c434c59cf6efde4980062a3645af3726d54f28d603eb |
Provenance
File details
Details for the file motils-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: motils-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dc175461549f969c79996187d74f5d3c8bd609cad14fb0f8957532e9c9e8dfa |
|
MD5 | a3376233b6b3d696b12ae5d21bd0b12e |
|
BLAKE2b-256 | 6b74aafa60d0cf49475036919687e69765fa5e4bfd684de09d37f805cebc1d32 |