
import os

DEMO_DATA_PATH=os.path.abspath(os.path.dirname(__file__))


def list_demo_files():
    """
    List the names of the bundled demo files
    """
    return os.listdir(DEMO_DATA_PATH)


import os

DEMO_DATA_PATH=os.path.abspath(os.path.dirname(__file__))


def list_demo_files():
    """
    List the names of the bundled demo files

    File names starting with _ or . are not listed. This allows to omit
    __init__.py, and hiden files.
    """
    return [demo_file for demo_file in os.listdir(DEMO_DATA_PATH)
            if not demo_file[0] in '_.']

def list_demo_files_absolute():
    """
    List the absolute path to the bundled demo files

    File names starting with _ or . are not listed. This allows to omit
    __init__.py, and hiden files.
    """
    return [os.path.join(DEMO_DATA_PATH, demo_file) for demo_file
            in list_demo_files()]

Add a function to list absolute path to demo files
Add a function to list absolute path to demo files

  
  import os
  
  DEMO_DATA_PATH=os.path.abspath(os.path.dirname(__file__))
  
  
  def list_demo_files():
      """
      List the names of the bundled demo files
+ 
+     File names starting with _ or . are not listed. This allows to omit
+     __init__.py, and hiden files.
      """
-     return os.listdir(DEMO_DATA_PATH)
+     return [demo_file for demo_file in os.listdir(DEMO_DATA_PATH)
+             if not demo_file[0] in '_.']
  
+ def list_demo_files_absolute():
+     """
+     List the absolute path to the bundled demo files
+ 
+     File names starting with _ or . are not listed. This allows to omit
+     __init__.py, and hiden files.
+     """
+     return [os.path.join(DEMO_DATA_PATH, demo_file) for demo_file
+             in list_demo_files()]
+ 
Add a function to list absolute path to demo files
## Code Before:

import os

DEMO_DATA_PATH=os.path.abspath(os.path.dirname(__file__))


def list_demo_files():
    """
    List the names of the bundled demo files
    """
    return os.listdir(DEMO_DATA_PATH)

## Instruction:
Add a function to list absolute path to demo files
## Code After:

import os

DEMO_DATA_PATH=os.path.abspath(os.path.dirname(__file__))


def list_demo_files():
    """
    List the names of the bundled demo files

    File names starting with _ or . are not listed. This allows to omit
    __init__.py, and hiden files.
    """
    return [demo_file for demo_file in os.listdir(DEMO_DATA_PATH)
            if not demo_file[0] in '_.']

def list_demo_files_absolute():
    """
    List the absolute path to the bundled demo files

    File names starting with _ or . are not listed. This allows to omit
    __init__.py, and hiden files.
    """
    return [os.path.join(DEMO_DATA_PATH, demo_file) for demo_file
            in list_demo_files()]
