Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Basthon
Basthon Kernel
Commits
6da0b02d
Commit
6da0b02d
authored
Oct 16, 2022
by
Romain Casati
Browse files
Python 3: drawSvg added.
parent
02fb8339
Changes
6
Hide whitespace changes
Inline
Side-by-side
packages/kernel-python3/custom-packages.json
View file @
6da0b02d
...
...
@@ -17,6 +17,15 @@
"imports"
:
[
"branca"
],
"depends"
:
[
"jinja2"
]
},
"drawsvg"
:
{
"name"
:
"drawSvg"
,
"version"
:
"1.8.3"
,
"file_name"
:
"https://files.pythonhosted.org/packages/65/07/6326bed81257671a3c3fd1f525bb9074c0bad61cb58ce77425dde2f18ee7/drawSvg-1.8.3-py3-none-any.whl"
,
"install_dir"
:
"site"
,
"sha256"
:
"2cef5cd3cc5cc01236da0142aa9afe053c2e9235861d38f6f77353ff8edb957f"
,
"imports"
:
[
"drawSvg"
],
"depends"
:
[
"imageio"
,
"numpy"
]
},
"filelock"
:
{
"name"
:
"filelock"
,
"version"
:
"3.8.0"
,
...
...
packages/kernel-python3/src/basthon/_patch_modules.py
View file @
6da0b02d
...
...
@@ -12,6 +12,9 @@ __email__ = "romain.casati@basthon.fr"
# as a tgz, it is extracted at the wrong location...
Path
(
"/lib/python3.10/site-packages/lolviz.py"
).
symlink_to
(
"lolviz-1.4.4/lolviz.py"
)
# Fake cairosvg module (for drawSvg)
Path
(
'/lib/python3.10/site-packages/cairosvg.py'
).
touch
()
@
importhook
.
on_import
(
'time'
)
def
patch_time
(
time
):
...
...
@@ -343,3 +346,12 @@ def patch_cv2(cv2):
imshow
.
__doc__
=
cv2
.
imshow
.
__doc__
cv2
.
imshow
=
imshow
@
importhook
.
on_import
(
'drawSvg'
)
def
patch_drawSvg
(
drawSvg
):
def
download
(
self
,
filename
=
"draw.svg"
):
"""Download drawing as SVG file."""
kernel
.
download
(
filename
,
self
.
asSvg
())
drawSvg
.
Drawing
.
download
=
download
tests/data/python3_drawSvg.html
0 → 100644
View file @
6da0b02d
<img
src=
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgogICAgIHdpZHRoPSIyMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSItMTAwLjAgLTUwLjAgMjAwIDEwMCI+CjxkZWZzPgo8L2RlZnM+CjxyZWN0IHg9Ii04MCIgeT0iLTUwIiB3aWR0aD0iNDAiIGhlaWdodD0iNTAiIGZpbGw9IiMxMjQ4ZmYiPgo8dGl0bGU+T3VyIGZpcnN0IHJlY3RhbmdsZTwvdGl0bGU+CjwvcmVjdD4KPC9zdmc+"
>
\ No newline at end of file
tests/data/python3_importables.json
View file @
6da0b02d
[
"Bio"
,
"CLAPACK"
,
"IPython"
,
"PIL"
,
"RobotRaconteur"
,
"__future__"
,
"__main__"
,
"_abc"
,
"_aix_support"
,
"_ast"
,
"_bisect"
,
"_bootsubprocess"
,
"_bz2"
,
"_codecs"
,
"_collections"
,
"_collections_abc"
,
"_compat_pickle"
,
"_compression"
,
"_contextvars"
,
"_frozen_importlib"
,
"_frozen_importlib_external"
,
"_functools"
,
"_heapq"
,
"_imp"
,
"_io"
,
"_json"
,
"_locale"
,
"_markupbase"
,
"_operator"
,
"_posixsubprocess"
,
"_py_abc"
,
"_pydecimal"
,
"_pyio"
,
"_pyodide"
,
"_pyodide_core"
,
"_random"
,
"_sha512"
,
"_signal"
,
"_sitebuiltins"
,
"_socket"
,
"_sre"
,
"_stat"
,
"_string"
,
"_strptime"
,
"_struct"
,
"_sysconfigdata__emscripten_wasm32-emscripten"
,
"_thread"
,
"_threading_local"
,
"_warnings"
,
"_weakref"
,
"_weakrefset"
,
"abc"
,
"aifc"
,
"antigravity"
,
"argparse"
,
"array"
,
"asciitree"
,
"ast"
,
"astropy"
,
"asynchat"
,
"asyncio"
,
"asyncore"
,
"atexit"
,
"atomicwrites"
,
"attr"
,
"autograd"
,
"b2d"
,
"base64"
,
"basthon"
,
"bdb"
,
"binarytree"
,
"binascii"
,
"binhex"
,
"bisect"
,
"bitarray"
,
"bleach"
,
"bokeh"
,
"boost_histogram"
,
"branca"
,
"brotli"
,
"bs4"
,
"builtins"
,
"bz2"
,
"cProfile"
,
"calendar"
,
"certifi"
,
"cffi"
,
"cffi_example"
,
"cftime"
,
"cgi"
,
"cgitb"
,
"chunk"
,
"cloudpickle"
,
"cmd"
,
"cmyt"
,
"code"
,
"codecs"
,
"codeop"
,
"collections"
,
"colorspacious"
,
"colorsys"
,
"compileall"
,
"concurrent"
,
"configparser"
,
"contextlib"
,
"contextvars"
,
"copy"
,
"copyreg"
,
"cpp-exceptions-test"
,
"crypt"
,
"cryptography"
,
"cssselect"
,
"csv"
,
"ctypes"
,
"cv2"
,
"cycler"
,
"cytoolz"
,
"dataclasses"
,
"datetime"
,
"dateutil"
,
"decimal"
,
"decorator"
,
"demes"
,
"difflib"
,
"dis"
,
"distlib"
,
"distutils"
,
"doctest"
,
"docutils"
,
"email"
,
"encodings"
,
"enum"
,
"erfa"
,
"errno"
,
"filecmp"
,
"fileinput"
,
"filelock"
,
"fnmatch"
,
"folium"
,
"fontTools"
,
"fpcast_test"
,
"fractions"
,
"freesasa"
,
"ftplib"
,
"functools"
,
"future"
,
"galpy"
,
"gc"
,
"genericpath"
,
"geos"
,
"getopt"
,
"getpass"
,
"gettext"
,
"glob"
,
"gmpy2"
,
"google"
,
"graphlib"
,
"graphviz"
,
"gsw"
,
"gzip"
,
"hashlib"
,
"heapq"
,
"hmac"
,
"html"
,
"html5lib"
,
"http"
,
"imageio"
,
"imaplib"
,
"imghdr"
,
"imp"
,
"importlib"
,
"iniconfig"
,
"inspect"
,
"io"
,
"ipaddress"
,
"ipythonblocks"
,
"itertools"
,
"jedi"
,
"jinja2"
,
"joblib"
,
"js"
,
"json"
,
"jsonschema"
,
"keyword"
,
"kiwisolver"
,
"lazy_object_proxy"
,
"libmagic"
,
"linecache"
,
"locale"
,
"logbook"
,
"logging"
,
"lolviz"
,
"lxml"
,
"lzma"
,
"magic"
,
"mailbox"
,
"mailcap"
,
"markupsafe"
,
"marshal"
,
"math"
,
"matplotlib"
,
"micropip"
,
"mimetypes"
,
"mne"
,
"modulefinder"
,
"more_itertools"
,
"mpl_toolkits"
,
"mpmath"
,
"msgpack"
,
"msprime"
,
"multiprocessing"
,
"netrc"
,
"networkx"
,
"newick"
,
"nlopt"
,
"nltk"
,
"nntplib"
,
"nose"
,
"ntpath"
,
"nturl2path"
,
"numbers"
,
"numcodecs"
,
"numpy"
,
"opcode"
,
"openssl"
,
"operator"
,
"optlang"
,
"optparse"
,
"os"
,
"osmiter"
,
"p5"
,
"packaging"
,
"pandas"
,
"parso"
,
"pathlib"
,
"patsy"
,
"pdb"
,
"pickle"
,
"pickletools"
,
"pipes"
,
"pkg_resources"
,
"pkgconfig"
,
"pkgutil"
,
"platform"
,
"plistlib"
,
"pluggy"
,
"poplib"
,
"posix"
,
"posixpath"
,
"pprint"
,
"profile"
,
"proj4py"
,
"pstats"
,
"pty"
,
"py"
,
"py_compile"
,
"pyclbr"
,
"pyclipper"
,
"pycparser"
,
"pydantic"
,
"pydoc"
,
"pydoc_data"
,
"pygments"
,
"pylab"
,
"pyodide"
,
"pyodide_js"
,
"pyparsing"
,
"pyproj"
,
"pyroutelib3"
,
"pyrsistent"
,
"pysat"
,
"pytest"
,
"pytest_benchmark"
,
"python_solvespace"
,
"pytz"
,
"pywt"
,
"qrcode"
,
"queue"
,
"quopri"
,
"random"
,
"rcviz"
,
"re"
,
"rebound"
,
"reboundx"
,
"regex"
,
"reprlib"
,
"requests"
,
"retrying"
,
"rlcompleter"
,
"ruamel"
,
"runpy"
,
"sched"
,
"scipy"
,
"secrets"
,
"select"
,
"selectors"
,
"setuptools"
,
"setuptools_scm"
,
"shapely"
,
"sharedlib-test"
,
"sharedlib_test"
,
"shelve"
,
"shlex"
,
"shutil"
,
"signal"
,
"site"
,
"six"
,
"skimage"
,
"sklearn"
,
"smtpd"
,
"smtplib"
,
"sndhdr"
,
"socket"
,
"socketserver"
,
"soupsieve"
,
"sparseqr"
,
"sqlalchemy"
,
"sqlite3"
,
"sre_compile"
,
"sre_constants"
,
"sre_parse"
,
"ssl"
,
"stat"
,
"statistics"
,
"statsmodels"
,
"string"
,
"stringprep"
,
"struct"
,
"subprocess"
,
"suitesparse"
,
"sunau"
,
"svgwrite"
,
"swiglpk"
,
"sympy"
,
"symtable"
,
"sys"
,
"sysconfig"
,
"tabnanny"
,
"tarfile"
,
"tblib"
,
"telnetlib"
,
"tempfile"
,
"termcolor"
,
"test"
,
"textwrap"
,
"this"
,
"threading"
,
"threadpoolctl"
,
"time"
,
"timeit"
,
"token"
,
"tokenize"
,
"tomli"
,
"tomli_w"
,
"toolz"
,
"tqdm"
,
"trace"
,
"traceback"
,
"tracemalloc"
,
"traits"
,
"tskit"
,
"tty"
,
"turtle"
,
"tutor"
,
"types"
,
"typing"
,
"typing_extensions"
,
"uncertainties"
,
"unittest"
,
"unyt"
,
"urllib"
,
"uu"
,
"uuid"
,
"warnings"
,
"wave"
,
"weakref"
,
"webbrowser"
,
"webencodings"
,
"wrapt"
,
"wsgiref"
,
"xarray"
,
"xdrlib"
,
"xgboost"
,
"xlrd"
,
"xml"
,
"xmlrpc"
,
"yaml"
,
"yt"
,
"zarr"
,
"zipapp"
,
"zipfile"
,
"zipimport"
,
"zlib"
,
"zoneinfo"
]
\ No newline at end of file
[
"Bio"
,
"CLAPACK"
,
"IPython"
,
"PIL"
,
"RobotRaconteur"
,
"__future__"
,
"__main__"
,
"_abc"
,
"_aix_support"
,
"_ast"
,
"_bisect"
,
"_bootsubprocess"
,
"_bz2"
,
"_codecs"
,
"_collections"
,
"_collections_abc"
,
"_compat_pickle"
,
"_compression"
,
"_contextvars"
,
"_frozen_importlib"
,
"_frozen_importlib_external"
,
"_functools"
,
"_heapq"
,
"_imp"
,
"_io"
,
"_json"
,
"_locale"
,
"_markupbase"
,
"_operator"
,
"_posixsubprocess"
,
"_py_abc"
,
"_pydecimal"
,
"_pyio"
,
"_pyodide"
,
"_pyodide_core"
,
"_random"
,
"_sha512"
,
"_signal"
,
"_sitebuiltins"
,
"_socket"
,
"_sre"
,
"_stat"
,
"_string"
,
"_strptime"
,
"_struct"
,
"_sysconfigdata__emscripten_wasm32-emscripten"
,
"_thread"
,
"_threading_local"
,
"_warnings"
,
"_weakref"
,
"_weakrefset"
,
"abc"
,
"aifc"
,
"antigravity"
,
"argparse"
,
"array"
,
"asciitree"
,
"ast"
,
"astropy"
,
"asynchat"
,
"asyncio"
,
"asyncore"
,
"atexit"
,
"atomicwrites"
,
"attr"
,
"autograd"
,
"b2d"
,
"base64"
,
"basthon"
,
"bdb"
,
"binarytree"
,
"binascii"
,
"binhex"
,
"bisect"
,
"bitarray"
,
"bleach"
,
"bokeh"
,
"boost_histogram"
,
"branca"
,
"brotli"
,
"bs4"
,
"builtins"
,
"bz2"
,
"cProfile"
,
"cairosvg"
,
"calendar"
,
"certifi"
,
"cffi"
,
"cffi_example"
,
"cftime"
,
"cgi"
,
"cgitb"
,
"chunk"
,
"cloudpickle"
,
"cmd"
,
"cmyt"
,
"code"
,
"codecs"
,
"codeop"
,
"collections"
,
"colorspacious"
,
"colorsys"
,
"compileall"
,
"concurrent"
,
"configparser"
,
"contextlib"
,
"contextvars"
,
"copy"
,
"copyreg"
,
"cpp-exceptions-test"
,
"crypt"
,
"cryptography"
,
"cssselect"
,
"csv"
,
"ctypes"
,
"cv2"
,
"cycler"
,
"cytoolz"
,
"dataclasses"
,
"datetime"
,
"dateutil"
,
"decimal"
,
"decorator"
,
"demes"
,
"difflib"
,
"dis"
,
"distlib"
,
"distutils"
,
"doctest"
,
"docutils"
,
"drawSvg"
,
"email"
,
"encodings"
,
"enum"
,
"erfa"
,
"errno"
,
"filecmp"
,
"fileinput"
,
"filelock"
,
"fnmatch"
,
"folium"
,
"fontTools"
,
"fpcast_test"
,
"fractions"
,
"freesasa"
,
"ftplib"
,
"functools"
,
"future"
,
"galpy"
,
"gc"
,
"genericpath"
,
"geos"
,
"getopt"
,
"getpass"
,
"gettext"
,
"glob"
,
"gmpy2"
,
"google"
,
"graphlib"
,
"graphviz"
,
"gsw"
,
"gzip"
,
"hashlib"
,
"heapq"
,
"hmac"
,
"html"
,
"html5lib"
,
"http"
,
"imageio"
,
"imaplib"
,
"imghdr"
,
"imp"
,
"importlib"
,
"iniconfig"
,
"inspect"
,
"io"
,
"ipaddress"
,
"ipythonblocks"
,
"itertools"
,
"jedi"
,
"jinja2"
,
"joblib"
,
"js"
,
"json"
,
"jsonschema"
,
"keyword"
,
"kiwisolver"
,
"lazy_object_proxy"
,
"libmagic"
,
"linecache"
,
"locale"
,
"logbook"
,
"logging"
,
"lolviz"
,
"lxml"
,
"lzma"
,
"magic"
,
"mailbox"
,
"mailcap"
,
"markupsafe"
,
"marshal"
,
"math"
,
"matplotlib"
,
"micropip"
,
"mimetypes"
,
"mne"
,
"modulefinder"
,
"more_itertools"
,
"mpl_toolkits"
,
"mpmath"
,
"msgpack"
,
"msprime"
,
"multiprocessing"
,
"netrc"
,
"networkx"
,
"newick"
,
"nlopt"
,
"nltk"
,
"nntplib"
,
"nose"
,
"ntpath"
,
"nturl2path"
,
"numbers"
,
"numcodecs"
,
"numpy"
,
"opcode"
,
"openssl"
,
"operator"
,
"optlang"
,
"optparse"
,
"os"
,
"osmiter"
,
"p5"
,
"packaging"
,
"pandas"
,
"parso"
,
"pathlib"
,
"patsy"
,
"pdb"
,
"pickle"
,
"pickletools"
,
"pipes"
,
"pkg_resources"
,
"pkgconfig"
,
"pkgutil"
,
"platform"
,
"plistlib"
,
"pluggy"
,
"poplib"
,
"posix"
,
"posixpath"
,
"pprint"
,
"profile"
,
"proj4py"
,
"pstats"
,
"pty"
,
"py"
,
"py_compile"
,
"pyclbr"
,
"pyclipper"
,
"pycparser"
,
"pydantic"
,
"pydoc"
,
"pydoc_data"
,
"pygments"
,
"pylab"
,
"pyodide"
,
"pyodide_js"
,
"pyparsing"
,
"pyproj"
,
"pyroutelib3"
,
"pyrsistent"
,
"pysat"
,
"pytest"
,
"pytest_benchmark"
,
"python_solvespace"
,
"pytz"
,
"pywt"
,
"qrcode"
,
"queue"
,
"quopri"
,
"random"
,
"rcviz"
,
"re"
,
"rebound"
,
"reboundx"
,
"regex"
,
"reprlib"
,
"requests"
,
"retrying"
,
"rlcompleter"
,
"ruamel"
,
"runpy"
,
"sched"
,
"scipy"
,
"secrets"
,
"select"
,
"selectors"
,
"setuptools"
,
"setuptools_scm"
,
"shapely"
,
"sharedlib-test"
,
"sharedlib_test"
,
"shelve"
,
"shlex"
,
"shutil"
,
"signal"
,
"site"
,
"six"
,
"skimage"
,
"sklearn"
,
"smtpd"
,
"smtplib"
,
"sndhdr"
,
"socket"
,
"socketserver"
,
"soupsieve"
,
"sparseqr"
,
"sqlalchemy"
,
"sqlite3"
,
"sre_compile"
,
"sre_constants"
,
"sre_parse"
,
"ssl"
,
"stat"
,
"statistics"
,
"statsmodels"
,
"string"
,
"stringprep"
,
"struct"
,
"subprocess"
,
"suitesparse"
,
"sunau"
,
"svgwrite"
,
"swiglpk"
,
"sympy"
,
"symtable"
,
"sys"
,
"sysconfig"
,
"tabnanny"
,
"tarfile"
,
"tblib"
,
"telnetlib"
,
"tempfile"
,
"termcolor"
,
"test"
,
"textwrap"
,
"this"
,
"threading"
,
"threadpoolctl"
,
"time"
,
"timeit"
,
"token"
,
"tokenize"
,
"tomli"
,
"tomli_w"
,
"toolz"
,
"tqdm"
,
"trace"
,
"traceback"
,
"tracemalloc"
,
"traits"
,
"tskit"
,
"tty"
,
"turtle"
,
"tutor"
,
"types"
,
"typing"
,
"typing_extensions"
,
"uncertainties"
,
"unittest"
,
"unyt"
,
"urllib"
,
"uu"
,
"uuid"
,
"warnings"
,
"wave"
,
"weakref"
,
"webbrowser"
,
"webencodings"
,
"wrapt"
,
"wsgiref"
,
"xarray"
,
"xdrlib"
,
"xgboost"
,
"xlrd"
,
"xml"
,
"xmlrpc"
,
"yaml"
,
"yt"
,
"zarr"
,
"zipapp"
,
"zipfile"
,
"zipimport"
,
"zlib"
,
"zoneinfo"
]
\ No newline at end of file
tests/data/python3_modules.txt
View file @
6da0b02d
Please wait a moment while I gather a list of all available modules...
Bio ca
lendar
l
ocale
s
ecrets
CLAPACK c
ertifi
logbook
s
elect
IPython c
ffi
lo
gging
se
lector
s
PIL cffi
_example
lo
lviz
se
tuptools
RobotRaconteur cf
time lxml
se
tuptools_scm
__future__ c
gi
l
zma
shapely
_abc cgi
tb
magic
s
haredlib-test
_aix_support c
hunk
mailbox
sha
redlib_test
_ast c
loudpickle
ma
ilcap
sh
elve
_bisect c
math
ma
rkupsafe
sh
lex
_blake2 cm
d
ma
rshal
sh
util
_bootsubprocess cm
yt
ma
th
signal
_bz2 c
ode
ma
tplotlib
s
ite
_codecs code
cs
m
icropip
si
x
_codecs_cn code
op
m
imetypes
s
kimag
e
_codecs_hk co
llections
m
map
s
klearn
_codecs_iso2022 col
orspac
io
u
s
mne
s
mtpd
_codecs_jp colors
y
s
modulefinder
s
mtplib
_codecs_kr co
mpileall
m
ore_itertools sndhdr
_codecs_tw co
ncurrent
m
pl_toolkits
s
ocket
_collections con
figparser mpmath socketserve
r
_collections_abc con
textlib msgpack
so
upsieve
_compat_pickle context
vars
m
sprime
s
parseq
r
_compression co
py multiprocessing sqlalchemy
_contextvars copy
reg
netrc
s
qlite3
_crypt c
pp-exceptions-test networkx sre_compile
_csv c
rypt newick
s
re_constants
_ctypes crypt
ography
nlopt
sre_
pars
e
_datetime c
ssselect
n
lt
k
ssl
_decimal cs
v
nntplib
s
tat
_distutils_hack c
types
n
ose
s
tatistic
s
_functools c
v2
ntp
ath
stat
smodels
_heapq c
ycler
n
turl2path
st
ring
_imp cy
toolz
n
umbers
st
ringprep
_io
dataclasses
n
umcodecs
str
uct
_json dat
etime
num
py
s
ubprocess
_locale date
u
ti
l
op
code
suitesparse
_lsprof d
ecima
l
openssl
su
nau
_markupbase dec
orator
op
erator
s
vgwrit
e
_md5 de
mes
op
tlang
s
wiglpk
_multibytecodec d
ifflib
op
tparse
s
ympy
_operator di
s
o
s
symtable
_pickle dis
tlib
o
smiter
sy
s
_posixsubprocess dist
utils
p5
sy
sconfig
_py_abc d
octest
packaging
tabnanny
_pydecimal doc
utils
p
andas
tarfile
_pyio
email
pa
rso
t
blib
_pyodide
encodings
pa
thlib
t
elnetlib
_queue e
num
pa
tsy
t
empfile
_random e
rfa
p
db
te
rmcolor
_sha1 e
rrno
p
ickle
te
st
_sha256
faulthandler pickletools
te
xtwrap
_sha3
filecmp
pi
pes
t
his
_sha512 f
ileinput pkg_resources threading
_signal file
lock
p
kgconfig
th
readpoolctl
_sitebuiltins f
nmatch
pkg
util time
_socket f
olium
p
latform
t
imeit
_sqlite3 f
ontTools
p
listlib
t
oken
_sre f
pcast_test pluggy
tokenize
_stat f
raction
s
po
pli
b
to
mli
_string f
reesasa
p
osix
to
mli_w
_strptime f
tplib
po
sixpath
to
olz
_struct f
unctools
p
print
t
qdm
_symtable f
uture
p
rofile
t
race
_sysconfigdata__emscripten_wasm32-emscripten
galpy
p
roj4py
t
raceback
_thread
gc
p
stats
trace
malloc
_threading_local g
enericpath
pty
tra
its
_tracemalloc g
eos
p
y
t
skit
_warnings ge
topt
p
y_compile
t
ty
_weakref ge
tpass
py
clbr
t
urtle
_weakrefset get
text
py
clipper
t
utor
_xxsubinterpreters g
lob
pyc
parser
t
ypes
abc g
mpy2
py
dantic
t
yping
aifc g
oogle
py
doc
typ
ing_extension
s
antigravity g
raphlib
pyd
oc_data
uncertainties
argparse g
raphviz
py
expat
unicodedata
array g
sw
py
gments
un
itt
es
t
asciitree g
zip
py
lab
un
yt
ast
hashlib
py
odide
u
rllib
astropy
heapq
py
parsing
u
u
asynchat h
mac
py
proj
u
uid
asyncio h
tml
py
routelib3
warnings
asyncore h
tml5lib
py
rsistent
wave
atexit ht
tp
py
sat weakref
atomicwrites
imageio
py
test
w
ebbrowser
attr
imaplib
py
test_benchmark webencodings
audioop im
ghdr
pyt
hon_solvespace wrapt
autograd im
p
pyt
z wsgiref
b2d im
portlib
py
wt xarray
base64 i
niconfig
qrcode
xdrlib
basthon i
nspect
queue
x
gboost
bdb i
o
q
uopri
x
lrd
binarytree i
paddress
random
x
ml
binascii i
pythonblocks rcviz
x
m
lr
pc
binhex i
tertool
s r
e
x
xsubtype
bisect
jedi
r
ebound
yaml
bitarray
jinja2
reboundx
yt
bleach j
oblib
re
gex
zarr
bokeh j
s
re
prlib
zipapp
boost_histogram j
son
re
quests
z
ipfile
branca js
onschema
re
trying
zip
import
brotli
keyword
r
lcompleter
z
lib
bs4
kiwisolver
r
uamel
z
oneinfo
builtins
lazy_object_proxy runpy
bz2
libmagic
sched
cProfile l
inecache sci
py
Bio ca
irosvg
l
ibmagic
s
ched
CLAPACK c
alendar
linecache
s
cipy
IPython c
ertifi
lo
cale
se
cret
s
PIL cffi
lo
gbook
se
lect
RobotRaconteur cf
fi_example logging
se
lectors
__future__ c
ftime
l
olviz
setuptools
_abc cgi
lxml
s
etuptools_scm
_aix_support c
gitb
lzma
sha
pely
_ast c
hunk
ma
gic
sh
aredlib-test
_bisect c
loudpickle
ma
ilbox
sh
aredlib_test
_blake2 cm
ath
ma
ilcap
sh
elve
_bootsubprocess cm
d
ma
rkupsafe
shlex
_bz2 c
myt
ma
rshal
s
hutil
_codecs code
m
ath
si
gnal
_codecs_cn code
cs
m
atplotlib
s
it
e
_codecs_hk co
deop
m
icropip
s
ix
_codecs_iso2022 col
lect
io
n
s
mimetypes
s
kimage
_codecs_jp colors
paciou
s
mmap
s
klearn
_codecs_kr co
lorsys
m
ne smtpd
_codecs_tw co
mpileall
m
odulefinder
s
mtplib
_collections con
current more_itertools sndhd
r
_collections_abc con
figparser mpl_toolkits
so
cket
_compat_pickle context
lib
m
pmath
s
ocketserve
r
_compression co
ntextvars msgpack soupsieve
_contextvars copy
msprime
s
parseqr
_crypt c
opyreg multiprocessing sqlalchemy
_csv c
pp-exceptions-test netrc
s
qlite3
_ctypes crypt
networkx
sre_
compil
e
_datetime c
ryptography
n
ewic
k
sre_constants
_decimal cs
sselect
nlopt
s
re_parse
_distutils_hack c
sv
n
ltk
ss
l
_functools c
types
n
ntp
lib
stat
_heapq c
v2
n
ose
st
atistics
_imp cy
cler
n
tpath
st
atsmodels
_io
cytoolz
n
turl2path
str
ing
_json dat
aclasses
num
bers
s
tringprep
_locale dateti
me
num
code
cs
struct
_lsprof d
ateuti
l
numpy
su
bprocess
_markupbase dec
imal
op
code
s
uitespars
e
_md5 de
corator
op
enssl
s
unau
_multibytecodec d
emes
op
erator
s
vgwrite
_operator di
fflib
o
ptlang
swiglpk
_pickle dis
o
ptparse
sy
mpy
_posixsubprocess dist
lib
os
sy
mtable
_py_abc d
istutils
osmiter
sys
_pydecimal doc
test
p
5
sysconfig
_pyio
docutils
pa
ckaging
t
abnanny
_pyodide
drawSvg
pa
ndas
t
arfile
_queue e
mail
pa
rso
t
blib
_random e
ncodings
p
athlib
te
lnetlib
_sha1 e
num
p
atsy
te
mpfile
_sha256
erfa pdb
te
rmcolor
_sha3
errno
pi
ckle
t
est
_sha512 f
aulthandler pickletools textwrap
_signal file
cmp
p
ipes
th
is
_sitebuiltins f
ileinput
pkg
_resources threading
_socket f
ilelock
p
kgconfig
t
hreadpoolctl
_sqlite3 f
nmatch
p
kgutil
t
ime
_sre f
olium platform
timeit
_stat f
ontTool
s pli
stlib
to
ken
_string f
pcast_test
p
luggy
to
kenize
_strptime f
ractions
po
plib
to
mli
_struct f
reesasa
p
osix
t
omli_w
_symtable f
tplib
p
osixpath
t
oolz
_sysconfigdata__emscripten_wasm32-emscripten
functools
p
print
t
qdm
_thread
future
p
rofile
trace
_threading_local g
alpy
proj4py
tra
ceback
_tracemalloc g
c
p
stats
t
racemalloc
_warnings ge
nericpath
p
ty
t
raits
_weakref ge
os
py
t
skit
_weakrefset get
opt
py
_compile
t
ty
_xxsubinterpreters g
etpass
pyc
lbr
t
urtle
abc g
ettext
py
clipper
t
utor
aifc g
lob
py
cparser
typ
e
s
antigravity g
mpy2
pyd
antic
typing
argparse g
oogle
py
doc
typing_extensions
array g
raphlib
py
doc_data
un
certainti
es
asciitree g
raphviz
py
expat
un
icodedata
ast
gsw
py
gments
u
nittest
astropy
gzip
py
lab
u
nyt
asynchat h
ashlib
py
odide
u
rllib
asyncio h
eapq
py
parsing
uu
asyncore h
mac
py
proj
uuid
atexit ht
ml
py
routelib3 warnings
atomicwrites
html5lib
py
rsistent
w
ave
attr
http
py
sat weakref
audioop im
ageio
pyt
est webbrowser
autograd im
aplib
pyt
est_benchmark webencodings
b2d im
ghdr
py
thon_solvespace wrapt
base64 i
mp
pytz
wsgiref
basthon i
mportlib
pywt
x
array
bdb i
niconfig
q
rcode
x
drlib
binarytree i
nspect
queue
x
gboost
binascii i
o quopri
xlr
d
binhex i
paddres
s r
andom
x
ml
bisect
ipythonblocks
r
cviz
xmlrpc
bitarray
itertools
re
xxsubtype
bleach j
edi
re
bound
yaml
bokeh j
inja2
re
boundx
yt
boost_histogram j
oblib
re
gex
z
arr
branca js
re
prlib
zip
app
brotli
json
r
equests
z
ipfile
bs4
jsonschema
r
etrying
z
ipimport
builtins
keyword rlcompleter zlib
bz2
kiwisolver
ruamel
zoneinfo
cProfile l
azy_object_proxy run
py
Enter any module name to get more help. Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
...
...
tests/test_python3_20_patched_modules.py
View file @
6da0b02d
...
...
@@ -275,3 +275,23 @@ def test_cv2(selenium_py3):
# img = result['display']['content']['image/png']
# target = read_and_backup(_test_data / "python3_cv2.png", img)
# assert target == img
def
test_drawSvg
(
selenium_py3
):
data
=
selenium_py3
.
run_basthon
(
"""
import drawSvg as draw
d = draw.Drawing(200, 100, origin='center', displayInline=False)
r = draw.Rectangle(-80,0,40,50, fill='#1248ff')
r.appendTitle('Our first rectangle')
d.append(r)
d
"""
)
assert
data
[
'stdout'
]
==
""
assert
data
[
'stderr'
]
==
""
result
=
data
[
'result'
]
html
=
result
[
'result'
][
'text/html'
]
target
=
read_and_backup
(
_test_data
/
"python3_drawSvg.html"
,
html
)
assert
target
==
html
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment