4D implementation of libpython.
- want more functionality than micropython, etc.
- want static library for package distribution.
/*
import fourd
d = {"foo":"bar"};
fourd.call("cb_test", d);
*/
//invoke the project method "cb_test" passing d as $1 (C_OBJECT)
METHOD GET CODE(Current method path;$code)
ARRAY LONGINT($pos;0)
ARRAY LONGINT($len;0)
If (Match regex("(?s)(?:\\/\\*)(.*)(?:\\*\\/)";$code;1;$pos;$len))
$py:=Substring($code;$pos{1};$len{1})
$status:=python ($py)
End if
/*
import fourd
fourd.call("cb_test", locals());
*/
//invoke the project method "cb_test" passing locals() as $1 (C_OBJECT)
METHOD GET CODE(Current method path;$code)
$locals:=New object("foo";"bar")
ARRAY LONGINT($pos;0)
ARRAY LONGINT($len;0)
If (Match regex("(?s)(?:\\/\\*)(.*)(?:\\*\\/)";$code;1;$pos;$len))
$py:=Substring($code;$pos{1};$len{1})
$status:=python ($py;$locals)
End if
(On) Windows it is not possible to build shared .dll extensions against a static libpython, so you must build any extensions you want into libpython itself.
- BUILTIN_ARRAY
- BUILTIN_ATEXIT
- BUILTIN_AUDIOOP
- BUILTIN_BINASCII
- BUILTIN_BISECT
- BUILTIN_BLAKE2
- BUILTIN_BZ2
- BUILTIN_CMATH
- BUILTIN_CODECS
- BUILTIN_CODECS_CN
- BUILTIN_CODECS_HK
- BUILTIN_CODECS_ISO2022
- BUILTIN_CODECS_JP
- BUILTIN_CODECS_KR
- BUILTIN_CODECS_TW
- BUILTIN_CSV
- BUILTIN_CTYPES
- BUILTIN_CURSES
- BUILTIN_CURSES_PANEL
- BUILTIN_DATETIME
- BUILTIN_DBM
- BUILTIN_DECIMAL
- BUILTIN_ELEMENTTREE
- BUILTIN_ERRNO
- BUILTIN_FAULTHANDLER
- BUILTIN_FCNTL
- BUILTIN_FUNCTOOLS
- BUILTIN_GDBM
- BUILTIN_GRP
- BUILTIN_HASHLIB
- BUILTIN_HEAPQ
- BUILTIN_IO
- BUILTIN_ITERTOOLS
- BUILTIN_JSON
- BUILTIN_LOCALE
- BUILTIN_LSPROF
- BUILTIN_LZMA
- BUILTIN_MATH
- BUILTIN_MD5
- BUILTIN_MMAP
- BUILTIN_MULTIBYTECODEC
- BUILTIN_MULTIPROCESSING
- BUILTIN_OPCODE
- BUILTIN_PARSER
- BUILTIN_PICKLE
- BUILTIN_POSIX
- BUILTIN_POSIXSUBPROCESS
- BUILTIN_PWD
- BUILTIN_PYEXPAT
- BUILTIN_RANDOM
- BUILTIN_READLINE
- BUILTIN_RESOURCE
- BUILTIN_SCPROXY
- BUILTIN_SELECT
- BUILTIN_SHA1
- BUILTIN_SHA256
- BUILTIN_SHA3
- BUILTIN_SHA512
- BUILTIN_SOCKET
- BUILTIN_SQLITE3
- BUILTIN_SRE
- BUILTIN_SSL
- BUILTIN_STAT
- BUILTIN_STRUCT
- BUILTIN_SYMTABLE
- BUILTIN_SYSLOG
- BUILTIN_TERMIOS
- BUILTIN_TESTBUFFER
- BUILTIN_TESTIMPORTMULTIPLE
- BUILTIN_TESTMULTIPHASE
- BUILTIN_THREAD
- BUILTIN_TIME
- BUILTIN_TKINTER
- BUILTIN_TRACEMALLOC
- BUILTIN_UNICODEDATA
- BUILTIN_WEAKREF
- BUILTIN_XXLIMITED
- BUILTIN_XXSUBTYPE
- BUILTIN_ZLIB
Windows or UNIX specific built-in extensions are left untouched.