def scripts():
    extension = ('.bat' if sys.platform.startswith('win') else '')
    header = ('' if sys.platform.startswith('win') else '#!/bin/sh')
    bin_dir = 'bin'
    command_dir = convert_path('conkit/command_line')
    scripts = []
    for file in os.listdir(command_dir):
        if ((not file.startswith('_')) and file.endswith('.py')):
            f_name = os.path.basename(file).rsplit('.', 1)[0]
            for c in ['.', '_']:
                new_f_name = f_name.replace(c, '-')
            script = os.path.join(bin_dir, (new_f_name + extension))
            with open(script, 'w') as f_out:
                f_out.write((header + os.linesep))
                if sys.platform.startswith('win'):
                    string = '@{0} -m conkit.command_line.{1} %*'
                else:
                    string = '{0} -m conkit.command_line.{1} "$@"'
                f_out.write((string.format(PYTHON_EXE, f_name) + os.linesep))
            os.chmod(script, 511)
            scripts.append(script)
    return scripts
def scripts():
    extension = ('.bat' if sys.platform.startswith('win') else )
    header = ( if sys.platform.startswith('win') else '#!/bin/sh')
    bin_dir = 'bin'
    command_dir = convert_path('conkit/command_line')
    scripts = []
    for file in os.listdir(command_dir):
        if ((not file.startswith('_')) and file.endswith('.py')):
            f_name = os.path.basename(file).rsplit('.', 1)[0]
            for c in ['.', '_']:
                new_f_name = f_name.replace(c, '-')
            script = os.path.join(bin_dir, (new_f_name + extension))
            with open(script, 'w') as f_out:
                f_out.write((header + os.linesep))
                if sys.platform.startswith('win'):
                    string = '@{0} -m conkit.command_line.{1} %*'
                else:
                    string = '{0} -m conkit.command_line.{1} "$@"'
                f_out.write((string.format(PYTHON_EXE, f_name) + os.linesep))
            os.chmod(script, 511)
            scripts.append(script)
    return scripts