Remove #! from Python files in Python API since they don't have __main__

This commit is contained in:
Paul Romano 2015-04-16 12:28:04 -05:00
parent 2d92f81ed9
commit 764ab84f01
17 changed files with 9 additions and 44 deletions

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc.element import *
from openmc.geometry import *
from openmc.nuclide import *

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
import numpy as np
@ -13,4 +11,3 @@ def is_float(val):
def is_string(val):
return isinstance(val, (str, np.str))

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
def sort_xml_elements(tree):
# Retrieve all children of the root XML node in the tree
@ -92,4 +90,4 @@ def clean_xml_indentation(element, level=0):
else:
if level and (not element.tail or not element.tail.strip()):
element.tail = i
element.tail = i

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc.checkvalue import *
from openmc.clean_xml import *
from xml.etree import ElementTree as ET
@ -583,4 +581,4 @@ class CMFDFile(object):
# Write the XML Tree to the cmfd.xml file
tree = ET.ElementTree(self._cmfd_file)
tree.write("cmfd.xml", xml_declaration=True,
encoding='utf-8', method="xml")
encoding='utf-8', method="xml")

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
"""Dictionaries of integer-to-string mappings from openmc/src/constants.F90"""
SURFACE_TYPES = {1: 'x-plane',

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc.checkvalue import *
class Element(object):

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc.checkvalue import *
import subprocess
import os
@ -72,4 +70,4 @@ class Executor(object):
cwd=self._working_directory)
else:
subprocess.check_call(command, shell=True, stdout=FNULL,
cwd=self._working_directory)
cwd=self._working_directory)

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
import openmc
from openmc.clean_xml import *
from xml.etree import ElementTree as ET
@ -159,4 +157,4 @@ class GeometryFile(object):
# Write the XML Tree to the materials.xml file
tree = ET.ElementTree(self._geometry_file)
tree.write("geometry.xml", xml_declaration=True,
encoding='utf-8', method="xml")
encoding='utf-8', method="xml")

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
import warnings
import openmc
@ -365,7 +363,7 @@ class Material(object):
else:
subelement = ET.SubElement(element, "compositions")
comps = []
allnucs = self._nuclides.values() + self._elements.values()
dist_per_type = allnucs[0][2]

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc.checkvalue import *
@ -80,4 +78,4 @@ class Nuclide(object):
string += '{0: <16}{1}{2}\n'.format('\tXS', '=\t', self._xs)
if self._zaid is not None:
string += '{0: <16}{1}{2}\n'.format('\tZAID', '=\t', self._zaid)
return string
return string

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
import openmc
import opencg
import copy

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc.checkvalue import *
from openmc.clean_xml import *
from xml.etree import ElementTree as ET

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
import struct, copy
import numpy as np
import scipy.stats
@ -383,7 +381,7 @@ class StatePoint(object):
# Extract the moment order string for each score
for k in range(len(scores)):
moment = self._get_string(8,
moment = self._get_string(8,
path='{0}order{1}'.format(subbase, k+1))
moment = moment.lstrip('[\'')
moment = moment.rstrip('\']')

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
import openmc
from openmc.opencg_compatible import get_opencg_geometry
import numpy as np
@ -354,7 +352,7 @@ class Summary(object):
if lattice_type == 'rectangular':
dimension = self._f['geometry/lattices'][key]['n_cells'][...]
lower_left = \
self._f['geometry/lattices'][key]['lower_left'][...]
self._f['geometry/lattices'][key]['lower_left'][...]
pitch = self._f['geometry/lattices'][key]['pitch'][...]
outer = self._f['geometry/lattices'][key]['outer'][0]

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc.checkvalue import *
from openmc.constants import BC_TYPES
from xml.etree import ElementTree as ET
@ -592,4 +590,4 @@ class ZCone(Cone):
# Initialize ZCone class attributes
super(ZCone, self).__init__(surface_id, bc_type, x0, y0, z0, R2, name=name)
self._type = 'z-cone'
self._type = 'z-cone'

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
from openmc import Nuclide
from openmc.clean_xml import *
from openmc.checkvalue import *

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
import openmc
from openmc.checkvalue import *
from xml.etree import ElementTree as ET