def main():
    '\n    Example entry point; please see Enumeration example for more in-depth\n    comments on preparing and cleaning up the system.\n\n    :return: True if successful, False otherwise.\n    :rtype: bool\n    '
    try:
        test_file = open('test.txt', 'w+')
    except IOError:
        print('Unable to write to current directory. Please check permissions.')
        input('Press Enter to exit...')
        return False
    test_file.close()
    os.remove(test_file.name)
    result = True
    system = PySpin.System.GetInstance()
    version = system.GetLibraryVersion()
    print(('Library version: %d.%d.%d.%d' % (version.major, version.minor, version.type, version.build)))
    cam_list = system.GetCameras()
    num_cameras = cam_list.GetSize()
    print(('Number of cameras detected: %d' % num_cameras))
    if (num_cameras == 0):
        cam_list.Clear()
        system.ReleaseInstance()
        print('Not enough cameras!')
        input('Done! Press Enter to exit...')
        return False
    for (i, cam) in enumerate(cam_list):
        print(('Running example for camera %d...' % i))
        result &= run_single_camera(cam)
        print(('Camera %d example complete... \n' % i))
    del cam
    cam_list.Clear()
    system.ReleaseInstance()
    input('Done! Press Enter to exit...')
    return result
Example entry point; please see Enumeration example for more in-depth
comments on preparing and cleaning up the system.

:return: True if successful, False otherwise.
:rtype: bool
def main():
    '\n    Example entry point; please see Enumeration example for more in-depth\n    comments on preparing and cleaning up the system.\n\n    :return: True if successful, False otherwise.\n    :rtype: bool\n    '
    try:
        test_file = open('test.txt', 'w+')
    except IOError:
        print('Unable to write to current directory. Please check permissions.')
        input('Press Enter to exit...')
        return False
    test_file.close()
    os.remove(test_file.name)
    result = True
    system = PySpin.System.GetInstance()
    version = system.GetLibraryVersion()
    print(('Library version: %d.%d.%d.%d' % (version.major, version.minor, version.type, version.build)))
    cam_list = system.GetCameras()
    num_cameras = cam_list.GetSize()
    print(('Number of cameras detected: %d' % num_cameras))
    if (num_cameras == 0):
        cam_list.Clear()
        system.ReleaseInstance()
        print('Not enough cameras!')
        input('Done! Press Enter to exit...')
        return False
    for (i, cam) in enumerate(cam_list):
        print(('Running example for camera %d...' % i))
        result &= run_single_camera(cam)
        print(('Camera %d example complete... \n' % i))
    del cam
    cam_list.Clear()
    system.ReleaseInstance()
    input('Done! Press Enter to exit...')
    return result