[Bf-python] nasty python scripts detection
Willian Padovani Germano
wgermano at ig.com.br
Sat May 17 05:53:40 CEST 2003
Hi, again : )
On Fri, 2003-05-16 at 18:12, guignot wrote:
> It's not mandatory to freeze with this method :
(...)
> We slightly modify it, and pass to python the following script
> :(modified script)
> import rexec
> R = rexec.RExec()
> R.r_eval("Blah Blah Blah")
Yes, you're probably right : ) (I haven't tested it yet).
If it works, we could have a new button at the Text Window to execute
scripts in "Safe Mode". Actually two buttons, the other for "Normal
Mode", our current ALT+PKEY.
> For complicated scripts, there are prbs about the newlines,
> and rexec refuses to load "Blender" (not in its dict), but I think these
> problems are probably solvable.
> I'll try to elaborate a solution. Not quite sure I'll succeed...
Great, let's hope it IS solvable.
> >There's also the problem of scripts crashing or hanging Blender itself
> >by making it perform very time- or memory-consuming actions (which btw
> >rexec documentation says it doesn't cover), but this one is not that
> >bad.
> Yes. I'm afraid it would be --very-- difficult to detect this kind of
> scripts.
With newer systems I suppose this really isn't that bad. It's easy to
hang Blender (try increasing too much the level of subdivision, for
example -- or better, don't do it ; )). It may take some seconds, but
at least under linux, I can change to another window and kill the
Blender process.
--
Willian, wgermano at ig.com.br
More information about the Bf-python
mailing list