Skip to content

Use os.mkdirs() to generate folders #2

@stawo

Description

@stawo

In the function visualize_and_dump in p3i\utils\vis.py instead of generating the output folder with:
os.system(f'mkdir -p {args.output_dir}')

try to use the available dedicated function os.mkdirs:
os.makedirs(args.output_dir, exist_ok=True)

On my Windows 10 machine the former command had the side effect of generating a folder named '-p', as I think on Windows the command mkdir does not accept any parameter (https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mkdir).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions