For the PyMainConfig structure idea, I cannot comment at this point. I
need more time to think about it.


About the "path configuration" fields, maybe a first step to enhance
the API would be to add the the following function:

PyInitError PyConfig_ComputePath(PyConfig *config, const wchar *home);

where home can be NULL (and PyConfig.module_search_paths_env field
goes away: the function reads PYTHONPATH env var internally).

This function would "compute the path configuration", what's currently
listed in _PyCoreConfig under:

    /* Path configuration outputs */
    int use_module_search_paths;  /* If non-zero, use module_search_paths */
    _PyWstrList module_search_paths;  /* sys.path paths. Computed if
                                       use_module_search_paths is equal
                                       to zero. */

    wchar_t *executable;    /* sys.executable */
    wchar_t *prefix;        /* sys.prefix */
    wchar_t *base_prefix;   /* sys.base_prefix */
    wchar_t *exec_prefix;   /* sys.exec_prefix */
    wchar_t *base_exec_prefix;  /* sys.base_exec_prefix */
#ifdef MS_WINDOWS
    wchar_t *dll_path;      /* Windows DLL path */
#endif

Victor
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to