pyslha.py

changeset 205
536967068fe2
parent 204
bef82eaef56e
child 207
2990422f1738
     1.1 --- a/pyslha.py	Sun Apr 28 22:15:24 2013 +0200
     1.2 +++ b/pyslha.py	Sun Apr 28 22:17:25 2013 +0200
     1.3 @@ -174,6 +174,10 @@
     1.4          else:
     1.5              self.entries[tuple(args[:-1])] = args[-1]
     1.6  
     1.7 +    def has_key(self, key):
     1.8 +        """Does the block have the given key?"""
     1.9 +        return self.entries.has_key(key)
    1.10 +
    1.11      def keys(self):
    1.12          """Access the block item keys."""
    1.13          return self.entries.keys()
    1.14 @@ -730,11 +734,11 @@
    1.15      #
    1.16      ATSS, ABSS, ALSS = getnextvalidlineitems()
    1.17      blocks["AU"] = Block("AU")
    1.18 -    blocks["AU"][3, 3] = ATSS))
    1.19 +    blocks["AU"][3, 3] = ATSS
    1.20      blocks["AD"] = Block("AD")
    1.21 -    blocks["AD"][3, 3] = ABSS))
    1.22 +    blocks["AD"][3, 3] = ABSS
    1.23      blocks["AE"] = Block("AE")
    1.24 -    blocks["AE"][3, 3] = ALSS))
    1.25 +    blocks["AE"][3, 3] = ALSS
    1.26      #
    1.27      MUSS = getnextvalidlineitems()[0]
    1.28      blocks["MINPAR"][4] = MUSS

mercurial