Skip to content

Instantly share code, notes, and snippets.

@jkeyoth
Created March 2, 2011 21:48
Show Gist options
  • Save jkeyoth/851813 to your computer and use it in GitHub Desktop.
Save jkeyoth/851813 to your computer and use it in GitHub Desktop.
Read all .vm files in a directory in python
inPath = sys.argv[1]
if path.isdir(inPath):
for file in os.listdir(inPath):
if path.splitext(file)[1] == ".vm":
vmNames.append(inPath + "/" + file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment