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

Feature request: Add shlex_join #386

Open
Poikilos opened this issue Jun 3, 2024 · 0 comments
Open

Feature request: Add shlex_join #386

Poikilos opened this issue Jun 3, 2024 · 0 comments

Comments

@Poikilos
Copy link

Poikilos commented Jun 3, 2024

Maybe add something like:

if sys.version_info.major > 3 and sys.version_info.minor >= 8:
    import shlex
    shlex_join = shlex.join
    del shlex
else:
    def shlex_join(parts):
        result = ""
        sep = ""
        for part in parts:
            result += sep
            sep = " "
            result += shlex_quote(part)
        return result
    # Maybe not now but script importing it could do something like: import shlex; import six; shlex.join = six.shlex_join
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