old_contents: """
  Useful additional string functions.
  """
  
  from __future__ import absolute_import
  
  
  from __future__ import division
  
  __author__ = "Shyue Ping Ong"
  __copyright__ = "Copyright 2012, The Materials Project"
  __version__ = "0.1"
  __maintainer__ = "Shyue Ping Ong"
  __email__ = "shyuep@gmail.com"
  __date__ = "2/28/14"
  
  
  def remove_non_ascii(s):
      """
      Remove non-ascii characters in a file. Needed when support for non-ASCII
      is not available.
  
      Args:
          s: Input string
  
      Returns:
          String with all non-ascii characters removed.
      """
      return "".join(i for i in s if ord(i) < 128)
new_contents: """
  Useful additional string functions.
  """
  
  from __future__ import absolute_import
  
  
  from __future__ import division
  
  __author__ = "Shyue Ping Ong"
  __copyright__ = "Copyright 2012, The Materials Project"
  __version__ = "0.1"
  __maintainer__ = "Shyue Ping Ong"
  __email__ = "shyuep@gmail.com"
  __date__ = "2/28/14"
  
  
  def remove_non_ascii(s):
      """
      Remove non-ascii characters in a file. Needed when support for non-ASCII
      is not available.
  
      Args:
          s: Input string
  
      Returns:
          String with all non-ascii characters removed.
      """
      return "".join(i for i in s if ord(i) < 128)
  
  
  def marquee(text="", width=78, mark='*'):
      """
      Return the input string centered in a 'marquee'.
  
      :Examples:
  
      >>> marquee('A test', width=40)
      '**************** A test ****************'
  
      >>> marquee('A test', width=40, mark='-')
      '---------------- A test ----------------'
  
      marquee('A test',40, ' ')
      '                 A test                 '
      """
      if not text:
          return (mark*width)[:width]
  
      nmark = (width-len(text)-2)//len(mark)//2
      if nmark < 0: 
          nmark = 0
  
      marks = mark * nmark
      return '%s %s %s' % (marks, text, marks)
  
subject: Add function to center a string in a `marquee`