create#

Disk utility functions for creating new files or directories.

Classes#

TemporaryDirectory

Create and return a temporary directory. This has the same

ProgressFileWrapper

Functions#

write_as_json_to_file(file_path, obj)

create_python_entry_point(target_full_path, ...)

create_application_entry_point(source_full_path, ...)

extract_tarball(tarball_full_path[, ...])

make_menu(prefix, file_path[, remove])

Create cross-platform menu items (e.g. Windows Start Menu)

create_hard_link_or_copy(src, dst)

_is_unix_executable_using_ORIGIN(path)

_do_softlink(src, dst)

create_fake_executable_softlink(src, dst)

copy(src, dst)

_do_copy(src, dst)

create_link(src, dst[, link_type, force])

compile_multiple_pyc(python_exe_full_path, ...)

create_package_cache_directory(pkgs_dir)

create_envs_directory(envs_dir)

Attributes#

stdoutlog

mkdir_p

python_entry_point_template

application_entry_point_template

class TemporaryDirectory(suffix='', prefix='tmp', dir=None)#

Create and return a temporary directory. This has the same behavior as mkdtemp but can be used as a context manager. For .. rubric:: Example

with TemporaryDirectory() as tmpdir:

...

Upon exiting the context, the directory and everything contained in it are removed.

name#
_closed = False#
__repr__()#

Return repr(self).

__enter__()#
cleanup(_warn=False, _warnings=_warnings)#
__exit__(exc, value, tb)#
__del__()#
stdoutlog#
mkdir_p#
python_entry_point_template#
application_entry_point_template#
write_as_json_to_file(file_path, obj)#
create_python_entry_point(target_full_path, python_full_path, module, func)#
create_application_entry_point(source_full_path, target_full_path, python_full_path)#
class ProgressFileWrapper(fileobj, progress_update_callback)#
__getattr__(name)#
__setattr__(name, value)#

Implement setattr(self, name, value).

read(size=-1)#
progress_update()#
extract_tarball(tarball_full_path, destination_directory=None, progress_update_callback=None)#
make_menu(prefix, file_path, remove=False)#

Create cross-platform menu items (e.g. Windows Start Menu)

Passes all menu config files %PREFIX%/Menu/*.json to menuinst.install. remove=True will remove the menu items.

_is_unix_executable_using_ORIGIN(path)#
copy(src, dst)#
_do_copy(src, dst)#
compile_multiple_pyc(python_exe_full_path, py_full_paths, pyc_full_paths, prefix, py_ver)#
create_package_cache_directory(pkgs_dir)#
create_envs_directory(envs_dir)#