2

I am using mac osx 10.9 and python 2.7 From one main app code, I want to call another application dailogbox.app present in /Applications location. dailogbox.app requires two arguments title and message as arguments. So, how to call from main app code this dailogbox.app with these two arguments to pass.

dailogbox.py code is :

import sys
import easygui
msg=(sys.argv)[1]
title=(sys.argv)[2]
easygui.msgbox(msg,title)

1 Answer 1

3

Assuming dialogbox.app is a normal OS X application, you can use the open command to run it.

import subprocess
msg=sys.argv[1]
title=sys.argv[2]
subprocess.call(["open", "dialogbox.app", "--args", msg, title])
Sign up to request clarification or add additional context in comments.

1 Comment

dialogbox.app should be called from main code. main code passses arguments to dialogbox.app code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.