2
I have created a mac application which can be open my file extensions.
But when I tested it, I dont get the path of the file requested to open using the application, instead I got the "psn_0_151589".
I checked it for itunes, textedit, xcode and other applications.
Below is my python app sample main code where i process path of the opened file
import sys
import os.path
print("File opened with this app :: ",sys.argv[1])
if(os.path.exists(sys.argv[1]):
print("valid file :: { do something...}\n")
else:
print("Invalid file path received :: { do nothing }\n")
OUTPUT :
File opened with this app :: psn_0_151589
Invalid file path received :: { do nothing }
Hope someone knows how to get the filepath which was opened using any application.
Any help would be greatly appreciated.
If you posted your code it would be easier to understand your question. – adayzdone – 2012-09-27T14:28:15.310
updated above with the sample code and its output – ramsey – 2012-09-27T15:28:19.767