Re: [Rest2web-develop] Added an 'ip_addr' IPv4 address value test...
Brought to you by:
mjfoord
From: Nicola L. <ni...@te...> - 2005-07-20 10:08:13
|
>> I'm for consistency (where useful), so I'd use "check" wherever it's >> visible to the (programmer) user, either docs or API. > The current ConfigObj method is called ``validate`` as it does more than > check a single value. > I'm adding the ability to check individual values to the ``Section`` - a > method I will now call ``check``. I take this as a "go ahead" with the "test" -> "check" renaming. :-) > On some platforms (like my PDA) importing socket is a non-trivial > action. I'm not sure if struct is available for *all* platforms (not all > the stdlib is implemented for all platforms - so dependency on a c > module for functionality that is unlikely to be used by many users....). That's a valid point (and I'd *like* Python on my Palm :-) ). > Anyway - it's academic if we move that out into a separate module or > move the import statements. I'd move the imports anyway, whether we separate the functions or not. >> But even before that, I'd place these two methods in a separate "utils.py" >> module, and maybe import *them* on demand. > I like the idea of keeping it as a single file if we can - but then it's > nice to include 'extra' tests that don't need to be part of the core > dist. Whatever you think best really. For my use case, the IP address value is necessary, I wouldn't want to move it to some extra module. So let's keep everything local, at least until there's other stuff to be included that would make the module too unwieldy. > What I really want is a way into twisted/nevow with WSGI... knowing > where to start is the problem. AFAIK, there were attempts to give a WSGI interface to Twisted, but it was harder than expected. WSGI was mainly thought for multithreaded app servers: this is hard to reconcile with Twisted concurrency model, and leads to suboptimal results. I think that Nevow may work through WSGI, but its native environment is direct Twisted. I'd like to be proven wrong in all this, of course, but Twisted has this tendency to rebuild the world in its image. :-) -- Nicola Larosa - ni...@te... When I was growing up, my parents used to say to me, "Tom, finish your dinner - people in China are starving." But after sailing to the edges of the flat world for a year, I am now telling my own daughters, "Girls, finish your homework - people in China and India are starving for your jobs." -- Thomas L. Friedman, New York Times, April 2005 |