Question about subprocess command with parameters

I read about subprocess in the net for a while, do I realy have to submit any parameter in quotes, and what is with parameters. A sample command I want to execute is

openssl ca -batch -config /Users/mk/CA_Dir/sign.ca.conf -extfile /Users/mk/CA_Dir/req.base.domain.conf     -extensions my_extensions -out /Users/mk/CA_Dir/base.domain.crt -infiles /Users/mk/CA_Dir/base.domain.csr

it is created with this cpython command

 sign_domain_cmd = f"openssl ca -batch -config {ca_folder_base}/sign.ca.conf -extfile {ca_folder_base}/req.base.domain.conf\
     -extensions my_extensions -out {ca_folder_base}/base.domain.crt -infiles {ca_folder_base}/base.domain.csr"
   

Or is it better to use os.

I apreciate any hint

Quotes are needed if the parameter contains whitespace because whitespace is used as the separator.

1 Like

Thank you, it works