Skip to main content

a library that was for working with files i guess

Project description


idk how to use the restructedtext thingy so uhh
all commands in this library:

smthfile(fp, mode):
does the same what codecs.open(fp, mode, encoding="utf-8") does
also check openfile(fp) and editfile(fp)

get_folder_path(caller, *args, create_folders):
constructs a folder path relative to the caller's directory, optionally creating missing folders
fore xample 👾👾👾👾👾👾:
print(temalib.get_folder_path(
__file__, "i", "am", "going", "to", "invade", "denmark"
))
# output: file's_subfolder/i/am/going/to/invade/denmark

get_file_path(caller, *args, create_folders, create_file):
does same what get_folder_path but last arg is a file (also optionally created)

add_line(fp, line):
formerly altteotf() (add line to the end of the file)

remove_line(fp, line):
if theres that line in the file then removes it

listpaths(fp):
return list of paths

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

temalib-3.6.tar.gz (4.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page