[tor-bugs] #4414 [Thandy]: ScriptWrapper should be multiplatform

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Nov 9 20:16:14 UTC 2011


#4414: ScriptWrapper should be multiplatform
--------------------+-------------------------------------------------------
 Reporter:  chiiph  |          Owner:  nickm       
     Type:  defect  |         Status:  needs_review
 Priority:  normal  |      Milestone:              
Component:  Thandy  |        Version:              
 Keywords:          |         Parent:              
   Points:          |   Actualpoints:              
--------------------+-------------------------------------------------------

Comment(by chiiph):

 Replying to [comment:4 nickm]:
 > How is it better than eval?  It changes our language from "Python" to
 "Not really Python".  Taking a quick look at the source for code.py, I see
 that internally all it's really doing is calling compile() and exec().

 eval will execute the code in the same environment (not just in terms of
 os.environ) than the rest of Thandy (and the same applies to compile/exec,
 afaict). With InteractiveInterpreter, it runs as if a new python process
 was doing it. I'll take a look at code.py and figure out a better way of
 doing this.

 > repr() on a string always gives you a string that evaluates to that
 string().
 >

 Yes, I guess that's the way to go :) I'll update the patch.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4414#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list