0

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)
imp
  • 1,575
  • 1
  • 24
  • 38

1 Answers1

2

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])
chepner
  • 389,128
  • 51
  • 403
  • 529
  • dialogbox.app should be called from main code. main code passses arguments to dialogbox.app code – imp May 29 '14 at 19:14