Re: [Zope] How do I ask Zope for the name of an uploaded file?
I dunno why, someone decided it's dangerous...? I just have an misc.py bunch of external methods which handle all my common stuff like re, os.path.basename, the exuserfolder crypt, etc.
Great stuff! Many thanks; this is what I needed, and more.
I dare a tangent: there are a lot of gaps in my Zope education. I can understand that Zope doesn't give access to os, for secur- ity reasons, but why is re unavailable?
Chris Beaven wrote:
I dare a tangent: there are a lot of gaps in my Zope education. I can understand that Zope doesn't give access to os, for secur- ity reasons, but why is re unavailable?
It's pretty easy to write an re that will infitintely loop. So, view that page 4 times and you have a totally hung Zope instance, no pretty ;-) Chris
On Tuesday 26 August 2003 01:25 pm, Chris Withers wrote:
Chris Beaven wrote:
I dare a tangent: there are a lot of gaps in my Zope education. I can understand that Zope doesn't give access to os, for secur- ity reasons, but why is re unavailable?
It's pretty easy to write an re that will infitintely loop. So, view that page 4 times and you have a totally hung Zope instance, no pretty ;-)
Is 4 a magic number, or is that just a "for instance" 4 X? (i.e. does this mean there's some kind of default to handle 4 requests in separate threads before you run out?). I ask because I have run into bugs in product development that probably were infinite loops and got about that many myself. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
Terry Hancock wrote:
Is 4 a magic number, or is that just a "for instance" 4 X? (i.e. does this mean there's some kind of default to handle 4 requests in separate threads before you run out?).
Yup, not 100% on the number, but it's something like that... cheers, Chris
Is 4 a magic number, or is that just a "for instance" 4 X?
It's the default number of threads, look for NUMBER_OF_THREADS in '<your zope>/z2.py' -- Jean Jordaan http://www.upfrontsystems.co.za
On Wednesday 27 August 2003 08:46 am, Jean Jordaan wrote:
Is 4 a magic number, or is that just a "for instance" 4 X?
It's the default number of threads, look for NUMBER_OF_THREADS in '<your zope>/z2.py'
Ah. Thank you. That is a very useful piece of information for testing. I assume it's possible to set that to 1 so that hangs will always hang the server on the first failure? That might be useful for testing (better repeatability). Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
I assume it's possible to set that to 1 so that hangs will always hang the server on the first failure? That might be useful for testing (better repeatability).
Yup. I've often run development Zopes with "-t 1", but it's baaad to go into production with more threads, when you've only been considering 1 during development :] -- Jean Jordaan http://www.upfrontsystems.co.za
Jean Jordaan wrote:
Is 4 a magic number, or is that just a "for instance" 4 X?
It's the default number of threads, look for NUMBER_OF_THREADS in '<your zope>/z2.py'
If your Zope still has a z2.py ;-) 2.7-ly yours, Chris
participants (4)
-
Chris Beaven -
Chris Withers -
Jean Jordaan -
Terry Hancock