mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 16:20:49 +01:00
[python/turtle] Added write method
Allows user to print strings with the turtle Change-Id: I06a3832f6fa36d29506be10c48a1b2fb34cb69fb
This commit is contained in:
@@ -193,3 +193,9 @@ mp_obj_t modturtle_hideturtle() {
|
||||
mp_obj_t modturtle_isvisible() {
|
||||
return sTurtle.isVisible() ? mp_const_true : mp_const_false;
|
||||
}
|
||||
|
||||
mp_obj_t modturtle_write(mp_obj_t s) {
|
||||
const char * string = mp_obj_str_get_str(s);
|
||||
sTurtle.write(string);
|
||||
return mp_const_none;
|
||||
}
|
||||
Reference in New Issue
Block a user