by CERN

Advanced graphical user interface for particle simulation programs
◀ Previous   △ Index   Next ▶

F7.5} Example

 Read an input file and modify the random number seed

   import deck
   deck.init()
   inp = deck.Input("test.inp")
   try:
       rndcard = inp["RANDOMIZ"][0]
       rndcard.setWhat(2, 5723)
   except:
       print "No RANDOMIZe card found"
       sys.exit(0)
   inp.write("test2.inp")

◀ Previous   △ Index   Next ▶