From 3e480dd17927aaf4bc1017e12303cdc2593cdffd Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 19 Mar 2009 21:30:30 +0000 Subject: adding "pippy-programmable" block --- (limited to 'tajail.py') diff --git a/tajail.py b/tajail.py index 7fafed5..af57e56 100644 --- a/tajail.py +++ b/tajail.py @@ -1,4 +1,4 @@ -#Copyright (c) 2007-9, Playful Invention Company. +#Copyright (c) 2009, Walter Bender (on behalf of Sugar Labs) #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -23,6 +23,7 @@ import re from time import * from math import * from numpy import * +from taturtle import * def myfunc(lc, f, x): # check to make sure no import calls are made @@ -34,3 +35,8 @@ def myfunc(lc, f, x): except: return None +def myfunc_import(lc, f, x): + userdefined = {} + exec f in globals(), userdefined + return userdefined['myblock'](lc,x) + -- cgit v0.9.1