All pastes #406135 Raw Edit

Someone

public python v1 · immutable
·published 2007-03-22 04:16 UTC
rendered paste body
def SortDir():	sourcedir = "%s%s" % (sourcerepos, release)	diroptions = glob.glob("%s" + "*") % (sourcedir)	if not diroptions:		print "No Directories contained a valid release of %s" % (release)	# crap no matches	elif len(diroptions) == 1:	# exactly one match, use it...		path = diroptions[0]	else:	# multiple options		for n, v in enumerate(diroptions):			print '[%d]  %s' % (n, v)			got = int(raw_input("Which? "))			got = int(sys.stdin.readline())			path = diroptions[got]			print 'using', path