Provides functionality for creating a new empty file with unique name
Project description
FileCreate
Provides functionality for creating a new empty file with unique name.
The file_mask parameter may contain a sequence of hash marks '#' which will be substituted by a unique sequence number starting from 001.
Install:
$ pip install FileCreate
Usage Samples:
from filecreate import FileCreate
# Create file using mask
with FileCreate('test####.txt') as file: # if test0001.txt does not exist - creates it
file.writelines() # working with file descriptor as usual
# Get available file name without creating an actual file
filename = FileCreate.get_filename('Folder', 'test###.txt')
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
filecreate-0.0.6.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for filecreate-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef747a23f9d7806d794482d9409557091dc4d7c63237c4c5315769f61d37ec38 |
|
MD5 | 9d1d65293ad5f775714694b821a24a01 |
|
BLAKE2b-256 | 0986abc516e5a9e76435871c1b0c6069cd2c379789266e2f782b5aff4c9b34bd |