I have a function that uses Xfoil to process a data file. However I am trying to tidy up some loose ends. As I am running OS X 10.8.2, Xfoil uses X11 (running as XQuartz) to create its graphs etc. I would like my function to also close the XQuartz app after it has finished so I am trying:
os.system("""'echo osascript -e 'tell application "XQuartz" to quit'""")
but am having no luck. I am using triple double-inverted commas to take the whole thing as a string and os is imported. I believe "osascript -e 'tell application "XQuartz" to quit'" is an Apple Script which I am trying to use with the echo function.