Big picture


New member

I am wandering what is the big picture behind 11l. Aspect that interests me the most is, effectively, compiling python. The potential problem is with the python ecosystem where, for default implementation, many libraries are written in C. Is there some way to wrap them to be able to link to them either in 11l or from C++ source?
An example is csv library from Python standard Library which actualy calls _csv library written in C. Is there a way to use such libraries with 11l (or any plans that would enable it)?


New member
Yes, here it goes (

#!/usr/bin/env python3
# -*- coding: utf8 -*-

import csv

filename: str = "csv_test.csv"
with open(filename, 'r') as infile:
    records = [row for row in csv.DictReader(infile, delimiter='\t', quotechar='"')]
I also put in the same directory with and changed imports (just changed from _csv import ... to import _csv) like this:

""" - read/write/investigate CSV files

import re
#from _csv import Error, __version__, writer, reader, register_dialect, \
#                 unregister_dialect, get_dialect, list_dialects, \
#                 field_size_limit, \
#                 __doc__
#from _csv import Dialect as _Dialect
#from io import StringIO
import _csv
import StringIO

           "Error", "Dialect", "__doc__", "excel", "excel_tab",
           "field_size_limit", "reader", "writer",
           "register_dialect", "get_dialect", "list_dialects", "Sniffer",
           "unregister_dialect", "__version__", "DictReader", "DictWriter",

and got following output when from 11l:

Syntax error: can not import module `_csv`: file '' is not found
in file '', line 15
import _csv
_csv is an example of a C library that is compiled and called from
My question is: is there a way to link to such libraries in 11l?
Sorrce code for that library is in the under python source tree: Modules/_csv.c


Staff member
is there a way to link to such libraries in 11l?
No, currently there is no way to link with C libraries.

First of all, you should answer the following questions:
Why you need your Python code be compiled with the Python → 11l → C++ transpiler? Does it have performance issues? Have you tried PyPy for better performance?

I am wandering what is the big picture behind 11l.
Big picture behind 11l [at least right now] is the following: 11l is not intended to solve every possible problem in the world, but rather to find such problems, which it can solve most effectively.