Running CCX with python script

Hello, I am attempting to run CCX through a python script. I have written .inp files but unable to get ccx to run. Is there any documentation on this or any help?

How are you calling ccx? What is the error you receive?

I would suggest to use os.chdir() to change the working directory of the Python process to the directory where the input file resides.
Also make sure that the Python process has sufficient rights to write files in that directory, and that there is sufficient space on the device for the output files.

Try using subprocess.run(), like this;

import os
import subprocess as sp

os.chdir("location_of_input_file")
# Note: don't use foo.inp!
cp = sp.run(['ccx', '-i', 'foo'], capture_output=True, text=True)
if cp.returncode:
    print(f'call to ccx failed with error code {cp.returncode}')
    # Optionally, write the contents of cp.stdout and/or cp.strerr to a file.