import sys import os #IJ.open("/Users/amw1/Desktop/untitled folder/2013-12-29 16.36.09.jpg") #imp = IJ.getImage() #win = imp.getWindow() od = OpenDialog("Choose file", None) inputName = od.getFileName() # check for canceled dialog or non-wsf files if inputName is None: sys.exit( "User canceled the dialog!") else: inputDir = od.getDirectory() inputPath = inputDir + inputName inputPrefix, sep, inputSuffix = inputName.rpartition(".") imp = IJ.openImage(inputPath) imp.show() win = imp.getWindow() import time outDir = inputDir+"zPlots/"+time.strftime("%Y%m%d%H%M")+"/" print outDir if not os.path.exists(outDir): # os.makedirs(outDir) print "got here"