Q:

Python: using os.execlp() with the path being a variable

I am converting a program from Batch to Python. Here is how I think I could do translate the Batch

%VBM% sharedfolder add %VMNAME% --name "LogDir" --hostpath %LogDir%

into:
os.execlp(VBM, 'sharedfolder', 'add', VMNAME, '--name', "LogDir",'--hostpath', LogDir)

My questions:

Considering VBM, VMNAME, and LogDir are variables that are declared
beforehand within my script, is my translation correct?
Is it ok that I represent the Path string with a variable, e.g. VBM
What could be a better way of doing any of the above?

A:

I decided to go ahead and use subprocess.call() and it works.

