import sys

appName = sys.argv[0]
appInstalled = 0
apps = AdminApp.list()
for app in apps.splitlines():
    if (app == appName):
        appInstalled = 1
        break
    else:
       pass

if (appInstalled == 1):
    print "Application " + appName + " is already installed!"
    sys.exit(0)
else:
    print "Application is not currently installed!"
    sys.exit(255)
