@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> depends on the OS
<0> on Unix it's basically anything other than /; on Windows it's a zillion damn things
<1> Hey all!
<2> Hi.
<1> lo...l



<3> brilliant.
<2> o.
<4> hmmh, just wondering - is it possible to "clean up" the scope visible to certain piece of code in python?
<4> didn't look easy last time I tried to figure it out
<4> implementing that reliably would allow importing foreign source from clients to servers and running it safely (think about agents)
<5> Hello. I love python, and I need to develop a good-looking website that does user management and quite complex forms. Can anyone give me any names of good python tools to do this job?
<5> ...It will be using a mySQL database...
<0> what do you mean "clean up" the scope?
<4> xihr: so that a piece of code would see only functions that server has explicitly defined it to see, like put_item and get_item, and that the foreign code would be unable to import other functions or modify/inspect internals of those functions
<4> for instance, any kind of access to the files should be impossible...
<0> if you're asking for a sandboxing system, there aren't really any there are guaranteed safe
<2> Unless you manually remove parts from Python before compiling it and run it in a chroot.
<2> That then would use some sort of RPC mechanism to communicate.
<4> xihr: :I
<4> thought so
<0> it really depends on how much limitation you want
<0> but the general case is definitely not (unfortunately)
<4> of course, one can construct reasonably arbitary code by generating stuff from input data to "code" using lambda calculus
<4> I have no idea how efficient or inefficient running such result would be, though



<0> yeah, basically
<0> after a certain level of generality true sandboxing becomes really, really difficult
<4> the fact my first university programming course was in Scheme is showing, I suppose
<0> :-)
<6> I wonder if PyPy could be used to build a better sandbox
<7> perkele
<8> I have a project where it's important that code be able to override methods in object instances (not the cl***es that the objects are created from) what's the best way to do this?
<6> P_O: ***igning functions to the instance? (You'll need to instantiate a MethodType() for each method+object)
<8> yason, so it's object.methodname = types.MethodType(<function>,object,cl***name)?
<6> yeah; quickly testing types.MethodType (function, object) will also do
<8> Thanks.
<6> since there are cl***method() and staticmethod() builtin functions, I'd have ***umed there's instancemethod() as well ;-) But there wasn't...
<9> anyone know of a tool I can use to discover bottlenecks in some python code?
<10> alcohol?
<11> bludot_: the Python profiler
<11> look it up
<9> yeah, just found it :)
<9> cheers though :)
<9> are there any guidelines for how to optimize the evaluation of a mathematical expression
<9> ?
<12> hi. when a file is locked, is there a way to block execution until it is released and available again without consuming all cpu cycles?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

nc100u-wm ubuntu
xfs_check Killed
insaminate
#freebsd
ARP-defense pix
#nhl
#sunos
#freebsd
#stocks
seeeeeexxx



Home  |  disclaimer  |  contact  |  submit quotes