Skip to content

Can't do import sys with ports/minimal #17705

Closed Answered by shariltumin
yf13 asked this question in Other
Discussion options

You must be logged in to vote

For minimal port the import will not import anything. The "main.c" file contains this:

mp_import_stat_t mp_import_stat(const char *path) {
    return MP_IMPORT_STAT_NO_EXIST;
}

The main purpose of the ports/minimal build is to test the Python interpreter. For example, you can do this:

>>> def sum(n,m):
...     print(n,'+',m,'=',n+m)
... 
>>> sum(3,4)
3 + 4 = 7

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@yf13
Comment options

@shariltumin
Comment options

@agatti
Comment options

@shariltumin
Comment options

Answer selected by yf13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Other
Labels
None yet
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy