First time here? Check out the Help page!
1 | initial version |
Shell? CYGWIN? EP-Macro? This is 2015!
python>>
for i in [f in listdir('.') if f[-len('.idf'):] == '.idf']:
for w in [f in listdir('.') if f[-len('.epw'):] == '.epw']:
call(["EnergyPlus -p %s -w %s %s" % (i[:-len('.idf')] + '_' + w[:-len('.epw')], w, i)])
Good night, drive home safely!
2 | No.2 Revision |
Shell? CYGWIN? EP-Macro? This is 2015!
python>>
for i in [f in listdir('.') if f[-len('.idf'):] == '.idf']:
glob('*.idf')]:
for w in [f in listdir('.') if f[-len('.epw'):] == '.epw']:
glob('*.epw')]:
call(["EnergyPlus -p %s -w %s %s" % (i[:-len('.idf')] + '_' + w[:-len('.epw')], w, i)])
Good night, drive home safely!
3 | No.3 Revision |
Shell? CYGWIN? EP-Macro? This is 2015!
python>>
for i in [f in glob('*.idf')]:
glob('*.idf'):
for w in [f in glob('*.epw')]:
glob('*.epw'):
call(["EnergyPlus -p %s -w %s %s" % (i[:-len('.idf')] + '_' + w[:-len('.epw')], w, i)])
Good night, drive home safely!
PS Thanks to @scottb for pointer to 'glob' (basically a 'listdir' with regular expressions, like a shell 'ls')!
4 | No.4 Revision |
Shell? CYGWIN? EP-Macro? This is 2015!
python>>
for i in glob('*.idf'):
for w in glob('*.epw'):
call(["EnergyPlus subprocess.call(["EnergyPlus -p %s -w %s %s" % (i[:-len('.idf')] + '_' + w[:-len('.epw')], w, i)])
Good night, drive home safely!
PS Thanks to @scottb for pointer to 'glob' (basically a 'listdir' with regular expressions, like a shell 'ls')!