Commits

Anonymous committed cfb3e7f

Updated the license descrition in all Python source files

  • Participants
  • Parent commits 4e53343

Comments (0)

Files changed (12)

 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2009
-#
-
 """
 @package NLTime
 
 Module containing classes for parsing and manipulating time info as
 can be found in NetLine 2005 itineraries files.
 
+Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+License: GPL v3.0
+
+Note: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
 """
 
 import re

File NetLine05.py

 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2009
-#
-
-"""
-@package NetLine05
+"""@package NetLine05
 
 Module containing classes for parsing and manipulating NetLine 2005
 itineraries files.
 
+Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+
+License: GPL v3.0
+
+NOTE: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
 """
 
 import os

File PIG_AnalysisTools.py

 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2009
-#
-
-
-"""
-@package PIG_AnalysisTools
+"""@package PIG_AnalysisTools
 
 This module provides with various capabilities for parsing information
 related to the PassengerItineraryGenerator (PIG) program.
-"""
 
+Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+License: GPL v3.0
+
+Note: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 
 import os
 import sys
 #  Script's methods and attributes
 #
 #-----------------------------------------------------------------
-
-
-DEBUG = False   ## Set this to False to disable the pdb.set_trace() calls.
-
+DEBUG = False  # Set this to False to disable the pdb.set_trace() calls.
 
 sample_file = "sample.txt"
 
+
 def sampleAirportsShortInfo():
     """
     Returns a list of (O,D) part of the sample data.
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-# mailto:eric.parent@gerad.ca
-# (c) Eric Parent, 2009
-#
+"""Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+
+License: GPL v3.0
+
+NOTE: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 
 import os
 import os.path

File compareResults.py

 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2009
-#
+"""
+Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+License: GPL v3.0
+
+Note: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 
 import os
 import sys
 #### Script methods ####
 
 def argumentFiles():
-    """
+    """@brief Gets the shelve file and pig file to be processed.  Some
+    routine checks about these files and returns them.
 
-    @brief Gets the shelve file and pig file to be processed.
-    Some routine checks about these files and returns them.
-    
     @throw exceptions.IOError if invalid files were given.
 
     """
 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-#
-# - Eric
-# mailto:eric.parent@gerad.ca
-#
+"""Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+License: GPL v3.0
+
+Note: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 
 import sys
 
-#Constantes arbitraires
+# Constantes arbitraires
 
 NIL = -999
 ECHEC = 1

File dayoffset.py

 #! /usr/bin/python
 # -*- coding: utf-8 -*-
 #
+"""Author: Eric Parent <eric.parent@gerad.ca>
 
+Copyright (C) 2008 Eric Parent
+
+License: GPL v3.0
+
+Note: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 import sys
 
 def weekDayOffset(times):

File demandAnalysis.py

 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2009
-#
+"""
+Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+
+License: GPL v3.0
+
+NOTE: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 
 import os
 import sys
 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2011
-#
-
-
-"""
-@package explain
+"""@package explain
 
 This module provides with various capabilities for parsing information
 related to the PassengerItineraryGenerator (PIG) program and compare
 two sets of itineraries being generated.
 
+Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+
+License: GPL v3.0
+
+NOTE: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
 """
 
 

File legsEncountered.py

 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2008
-#
+"""Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+
+License: GPL v3.0
+
+NOTE: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 
 import os
 import sys
 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2008
-#
+
+"""Author: Eric Parent <eric.parent@gerad.ca>
+
+Copyright (C) 2008 Eric Parent
+
+
+License: GPL v3.0
+
+NOTE: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 
 import os
 import sys
 #! /usr/bin/python
 # -*- coding: utf-8 -*-
-#
-# Programmer: Eric Parent
-#
-# mailto:eric.parent@gerad.ca
-#
-# (c) Eric Parent, 2009
-#
+"""Author: Eric Parent <eric.parent@gerad.ca>
 
+Copyright (C) 2008 Eric Parent
 
+
+License: GPL v3.0
+
+NOTE: See the file 'gpl-3.0.txt' that is bundled with this file for
+the details of the license.
+
+"""
 import os
 import sys
 import shelve
 
 #####
 def validateFile(file):
-   if not os.path.exists(file):
-      print 'File to be parsed does not exists.', 
-      print 'Please give a valide file to be parsed.'
-      sys.exit(1)
+    if not os.path.exists(file):
+        print 'File to be parsed does not exists.', 
+        print 'Please give a valide file to be parsed.'
+        sys.exit(1)
 
-   if not os.path.isfile(file):
-      print 'File given is not a file. ',
-      print 'Please indicate a file to be parsed.'
-      sys.exit(1)
+    if not os.path.isfile(file):
+        print 'File given is not a file. ',
+        print 'Please indicate a file to be parsed.'
+        sys.exit(1)
 
 
 #####
    @post filename file is created and contains the information
    contained in Dict.
    """
-   f = open(filename, "w")
-   keys = Dict.keys()
-   keys.sort()
-   for key in keys:
-      content = Dict[key]
-      if hasattr(content, '__iter__'):
-         f.write(str(key)+' : ')
-         # it is iterable...
-         str_content = [str(i) for i in content]
-         f.write('; '.join(str_content))
-      else:
-         f.write( '%s : %s' % (str(key), str(content)))
-      f.write('\n')
-   f.close()
+    f = open(filename, "w")
+    keys = Dict.keys()
+    keys.sort()
+    for key in keys:
+        content = Dict[key]
+        if hasattr(content, '__iter__'):
+            f.write(str(key) + ' : ')
+            # it is iterable...
+            str_content = [str(i) for i in content]
+            f.write('; '.join(str_content))
+        else:
+            f.write('%s : %s' % (str(key), str(content)))
+        f.write('\n')
+    f.close()
 
 
 #####
 def removeTupleListDuplicates(W):
-   """
-   @param W une liste qui comporte peut-être plusieurs fois le même élément
-   """
-   W.sort()
-   last = W[-1]
-   for i in range(len(W)-2, -1, -1):
-       if last == W[i]:
-          del W[i]
-       else:
-          last = W[i]
-   for i in W:
-      (a,b) = i
-      k = (b,a)
-      if k in W:
-         W.remove(k)
-   return W
+    """@param W une liste qui comporte peut-être plusieurs fois le
+    même élément
+
+    """
+    W.sort()
+    last = W[-1]
+    for i in range(len(W) - 2, -1, -1):
+        if last == W[i]:
+            del W[i]
+        else:
+            last = W[i]
+    for i in W:
+        (a, b) = i
+        k = (b, a)
+        if k in W:
+            W.remove(k)
+    return W
 
 
-#####
 def removeListDuplicates(List):
-   """
-   @param List a list which might contain duplicates.
-
-   @return a list with one and only one occurence of the elements of List,
-   i.e. List with its duplicates removed.
-   """
-   List.sort()
-   last = List[-1]
-   for i in range(len(List)-2, -1, -1):
-       if last == List[i]:
-          del List[i]
-       else:
-          last = List[i]
-   return List
+    """
+    @param List a list which might contain duplicates.
+    
+    @return a list with one and only one occurence of the elements of List,
+    i.e. List with its duplicates removed.
+    """
+    List.sort()
+    last = List[-1]
+    for i in range(len(List) - 2, -1, -1):
+        if last == List[i]:
+            del List[i]
+         else:
+            last = List[i]
+    return List
 
 
 #####