Exemplo n.º 1
0
      menu.Prompt('Press Enter to Update '+work_dir)
      MakeProblem(work_dir, pluto_dir, 1, 1)
      menu.Print ("Configuration up to date",sleep=0.75)
      break

    if interface_optval == interface_opts[3]: #Save Setup
      sys.exit()

  if (menu.CursesIsActive()): menu.RestoreScreen()
  print "\n> Done."
  sys.exit()

if __name__ == "__main__":   # starts from here
  auto_update = 0
  print "\n> Checking system architecture\n"
  configure.check(pluto_directory, 1)
  for x in sys.argv[1:]:     # check argument list
    if (x == "--get-arch"):
      sys.exit(1)
      break

    if (x == "--with-chombo" or x == "--with-chombo:"): 
      print "Enabling Chombo support for AMR"
      cmset = set(['--with-fd','--with-sb','--with-fargo']) & set(sys.argv)
      if len(cmset) != 0:
        print '! Incompatible modules, ',x,' + '.join(y for y in cmset) 
        sys.exit(1)
      break

    elif (x == "--with-sb"): 
      print "Enabling support for shearing box module"
Exemplo n.º 2
0
    pluto_dir = os.environ["PLUTO_DIR"]
except:
    pluto_dir = os.getcwd()
#  print "---------------------------------------------------------------"
#  print " WARNING:"
#  print "  "
#  print " Your PLUTO_DIR shell variable does not seem to be defined. "
#  print " Please set PLUTO_DIR as the directory name of your PLUTO    "
#  print " distribution before proceeding, e.g.\n"
#  print '    > setenv PLUTO_DIR "/home/user/PLUTO"\n'
#  print " if you're using tcsh, or \n"
#  print '    > export PLUTO_DIR="/home/user/PLUTO"\n'
#  print " if you're using bash."
#  print "---------------------------------------------------------------"
#  sys.exit()

print "PLUTO directory is defined as: ", pluto_dir
sys.path.append(pluto_dir + '/Tools/Python')
import ut
import configure

#sys.stdout.write('loading...')
#sys.stdout.flush()
#pluto_dir   = os.getcwd();
#pluto_dir   = os.path.abspath(pluto_dir)

configure.check(pluto_dir, get_arch)
if (get_arch): sys.exit(1)
#os.chdir(pluto_dir)
ut.main_menu(pluto_dir)
Exemplo n.º 3
0
      menu.Prompt('Press Enter to Update '+work_dir)
      MakeProblem(work_dir, pluto_dir, 1, 1)
      menu.Print ("Configuration up to date",sleep=0.75)
      break

    if interface_optval == interface_opts[3]: #Save Setup
      sys.exit()

  if (menu.CursesIsActive()): menu.RestoreScreen()
  print "\n> Done."
  sys.exit()

if __name__ == "__main__":   # starts from here
  auto_update = 0
  print "\n> Checking system architecture\n"
  configure.check(pluto_directory, 1)
  for x in sys.argv[1:]:     # check argument list
    if (x == "--get-arch"):
      sys.exit(1)
      break

    if (x == "--with-chombo" or x == "--with-chombo:"): 
      print "Enabling Chombo support for AMR"
      cmset = set(['--with-fd','--with-sb','--with-fargo']) & set(sys.argv)
      if len(cmset) != 0:
        print '! Incompatible modules, ',x,' + '.join(y for y in cmset) 
        sys.exit(1)
      break

    elif (x == "--with-sb"): 
      print "Enabling support for shearing box module"
Exemplo n.º 4
0
  pluto_dir = os.getcwd()
#  print "---------------------------------------------------------------"
#  print " WARNING:"
#  print "  "
#  print " Your sgPLUTO_DIR shell variable does not seem to be defined. " 
#  print " Please set sgPLUTO_DIR as the directory name of your PLUTO    "
#  print " distribution before proceeding, e.g.\n"
#  print '    > setenv sgPLUTO_DIR "/home/user/PLUTO"\n'
#  print " if you're using tcsh, or \n"
#  print '    > export sgPLUTO_DIR="/home/user/PLUTO"\n'
#  print " if you're using bash."
#  print "---------------------------------------------------------------"
#  sys.exit()


print "PLUTO directory is defined as: ",pluto_dir
sys.path.append(pluto_dir+'/Tools/Python')
import ut
import configure

#sys.stdout.write('loading...')
#sys.stdout.flush()
#pluto_dir   = os.getcwd();
#pluto_dir   = os.path.abspath(pluto_dir)

configure.check(pluto_dir, get_arch)
if (get_arch): sys.exit(1)
#os.chdir(pluto_dir)
ut.main_menu(pluto_dir)