MATLAB: How to pass a matlab string as an exclamation point command

!exclamation_command

pathName = '.../foldername/subfoldername'
scriptName = 'main.py'
How do you issue a command to run some file in that folder without changing your working directory or current folder?
!python (pathName)/main.py &
This fails.
Capture.PNG

Best Answer

If you use the system function instead of the exclamation point operator you can pass a fully parsed char array.