Command Starting with a Number #721
Answered
by
amoffat
bnerickson
asked this question in
Q&A
-
I'm trying to execute some 7z commands using sh, but python doesn't accept variables starting with a number:
Is there a workaround for this? |
Beta Was this translation helpful? Give feedback.
Answered by
amoffat
Apr 3, 2024
Replies: 1 comment 1 reply
-
Try instantiating the Command object manually: import sh
seven_z = sh.Command("7z")
seven_z(...) https://sh.readthedocs.io/en/latest/sections/command_class.html#Command |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bnerickson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try instantiating the Command object manually:
https://sh.readthedocs.io/en/latest/sections/command_class.html#Command