

print "Edit script!"
print sys.argv


editFilepath = sys.argv[1]



if(os.name == "mac"):
	
	try:
		import findertools, macfs
		#fsspec = macfs.FSSpec(editFilepath)
		#finfo = fsspec.GetFInfo()
		#print finfo.Flags
		file = open(editFilepath, "a")
		file.close()
		findertools.launch(editFilepath)
	except:
		print "Unable to open the file for editing... It may be locked.\n"
	
	
		
elif(os.name == "dos" or os.name == "nt"):
	
	import win32api
	win32api.ShellExecute(0, "open", editFilepath, None, "", 1)
	
else:
	raise "unrecognized operating system\n"




