source: libcaca/trunk/python/examples/cacainfo.py @ 4398

Last change on this file since 4398 was 4398, checked in by Sam Hocevar, 11 years ago

New improved ctypes-based Python bindings, by Alex Foulon <alxf@lavabit.com>.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# libcaca       Colour ASCII-Art library
5#               Python language bindings
6# Copyright (c) 2010 Alex Foulon <alxf@lavabit.com>
7#               All Rights Reserved
8#
9# This library is free software. It comes without any warranty, to
10# the extent permitted by applicable law. You can redistribute it
11# and/or modify it under the terms of the Do What The Fuck You Want
12# To Public License, Version 2, as published by Sam Hocevar. See
13# http://sam.zoy.org/wtfpl/COPYING for more details.
14#
15
16""" Libcaca Python bindings """
17
18import caca
19
20if __name__ == '__main__':
21    print("libcaca version %s" % caca.get_version())
22    print("")
23    print("Available drivers:")
24    for drv, desc in caca.get_display_driver_list():
25        print("  - %s: %s" % (drv, desc))
26    print("")
27    print("Available fonts:")
28    for font in caca.get_font_list():
29        print("  - %s" % font)
30    print("")
31    print("Export formats:")
32    for fmt, desc in caca.get_export_list():
33        print("  - %s: %s" % (fmt, desc))
34    print("")
35    print("Import formats:")
36    for fmt, desc in caca.get_import_list():
37        print("  - %s: %s" % (fmt, desc))
Note: See TracBrowser for help on using the repository browser.