Re: [Rest2web-develop] Added an 'ip_addr' IPv4 address value test...
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-07-20 11:04:03
|
Nicola Larosa wrote: >>>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. :-) > I thought I'd agreed. Anyway - no problem, we've completely broken backwards compatibility anyway (in lots of good ways - but anything using the new system is going to have to change code already). I let Mark Andrews know that there was development work going on, but never heard back from him. He hasn't blogged for ages either - real life must be intruding, terrible stuff. > > >>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. > Cool - I'll leave you to do it next edit. I've done a couple of new articles for my website (done my Romania blog and part II of my life story as articles) - so I'm returning to editing ConfigObj. Nice one for the restructuring by the way. > > >>>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. > Ok - do you think it's worth implementing a generic 'regex' test (that leaves values as strings), with a standard dict of (any ?) regexes. > > >>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. :-) > Right.. hmm.. trying to fight my way through buzz words. I have a lot of respect for Ian Bicking and the WSGI crew. I also like the idea of being 'back end independent'. I am also reasonably convinced that twisted is the way forward for any decent web application - so if they're not compatible... then so be it. I'm interested in Nevow... *but* I like the ultra simplicity of 'embedded_code'. I don't yet understand what Nevow has to offer that is more than templating. In fact most templating languages seem to me just another new language (albeit simpler) to avoid embedding python - when embedding python code is much more powerful (and I like Python). Best Regards, Fuzzy http://www.voidspace.org.uk/python |