SHARE
TWEET

Untitled

a guest May 16th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2.  
  3. filenames = os.listdir("./")
  4. with open("./merged.gaml", 'w') as outfile:
  5.     outfile.write("model MergedModel")
  6.     for fname in filenames:
  7.         if ".gaml" in fname:
  8.             with open("./"+fname) as infile:
  9.                 for line in infile:
  10.                     if (not "model" in line) and (not "import" in line):
  11.                         outfile.write(line)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top