tools/cygprofile/orderfile_generator_backend.py
def _GetFileExtension(file_name):
  """Calculates the file extension from a file name.

  Args:
    file_name: The source file name.
  Returns:
    The part of file_name after the dot (.) or None if the file has no
    extension.
    Examples: /home/user/foo.bar     -> bar
              /home/user.name/foo    -> None
              /home/user/.foo        -> None
              /home/user/foo.bar.baz -> baz
  """
  file_name_parts = os.path.basename(file_name).split('.')
  if len(file_name_parts) > 1:
    return file_name_parts[-1]
  else:
    return None
Calculates the file extension from a file name.

  Args:
    file_name: The source file name.
  Returns:
    The part of file_name after the dot (.) or None if the file has no
    extension.
    Examples: /home/user/foo.bar     -> bar
              /home/user.name/foo    -> None
              /home/user/.foo        -> None
              /home/user/foo.bar.baz -> baz
  
Calculates the file extension from a file name.
Calculates the file extension from a file name .
def _GetFileExtension(file_name):
  file_name_parts = os.path.basename(file_name).split('.')
  if len(file_name_parts) > 1:
    return file_name_parts[-1]
  else:
    return None
def _GetFileExtension ( file_name ) : file_name_parts = os . path . basename ( file_name ) . split ( '.' ) if len ( file_name_parts ) > 1 : return file_name_parts [ - 1 ] else : return None
Calculates the file extension from a file name.
Calculates the file extension from a file name .
"""Calculates the file extension from a file name.

  Args:
    file_name: The source file name.
  Returns:
    The part of file_name after the dot (.) or None if the file has no
    extension.
    Examples: /home/user/foo.bar     -> bar
              /home/user.name/foo    -> None
              /home/user/.foo        -> None
              /home/user/foo.bar.baz -> baz
  """
The part of file_name after the dot (.) or None if the file has no
extension.
Examples: /home/user/foo.bar     -> bar
home/user.name/foo    -> None
home/user/.foo        -> None
home/user/foo.bar.baz -> baz
The part of file_name after the dot ( . ) or None if the file has no extension . Examples : / home / user / foo . bar - > bar home / user . name / foo - > None home / user / . foo - > None home / user / foo . bar . baz - > baz
file_name
The source file name.
The source file name .