Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use os.mkdirs() to generate folders #2

Open
stawo opened this issue Oct 13, 2020 · 0 comments
Open

Use os.mkdirs() to generate folders #2

stawo opened this issue Oct 13, 2020 · 0 comments

Comments

@stawo
Copy link

stawo commented Oct 13, 2020

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant