openoffice.org - open Openoffice calc using system command using python -
i trying open calc openoffice in listening mode using python. earlier opening typing following command in terminal:
c:\program files\openoffice 4\program\soffice" -calc "-accept=socket,host=localhost,port=2002;urp;"& now won't open if use os.system(command) follows:
os.system('"c:\program files\openoffice 4\program\soffice" -calc "-accept=socket,host=localhost,port=2002;urp;"&') i tried:
os.system('c:\\"program files"\\"openoffice 4"\\program\\soffice -calc "-accept=socket,host=localhost,port=2002;urp;"&') this results in following error:
the program cannot started.a general error occurred while accessing central configuration.
but while running command terminal working.
which operating system using?
nevertheless, avoid os.system calls , prefer subprocess. here link documentation.
as example:
subprocess.check_call(["c:\path\program", "argument1", "argument2"]) this works on machine.
Comments
Post a Comment