00001 from vyperlogix import misc 00002 from vyperlogix.hash import lists 00003 00004 __copyright__ = """\ 00005 (c). Copyright 1990-2008, Vyper Logix Corp., 00006 00007 All Rights Reserved. 00008 00009 Published under Creative Commons License 00010 (http://creativecommons.org/licenses/by-nc/3.0/) 00011 restricted to non-commercial educational use only., 00012 00013 See also: http://www.VyperLogix.com and http://www.pypi.info for details. 00014 00015 THE AUTHOR VYPER LOGIX CORP DISCLAIMS ALL WARRANTIES WITH REGARD TO 00016 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 00017 FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00018 INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00019 FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00020 NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00021 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE ! 00022 00023 USE AT YOUR OWN RISK. 00024 """ 00025 00026 def post_from_sqlalchemy(request): 00027 d = lists.HashedLists() 00028 for k,v in request.POST.iteritems(): 00029 toks = k.split('-') 00030 _d_ = d 00031 for t in toks[0:-1]: 00032 _d = _d_[t] 00033 if (_d is None): 00034 _d = lists.HashedLists2() 00035 _d_[t] = _d 00036 else: 00037 _d = _d[0] if (misc.isList(_d)) else _d 00038 _d_ = _d 00039 _d_[toks[-1]] = v[0] if (misc.isList(v)) else v 00040 return d 00041 00042 if (__name__ == '__main__'): 00043 import sys 00044 print >>sys.stdout, __copyright__ 00045 print >>sys.stderr, __copyright__ 00046 00047
© Copyright 2008-2009 Vyper Logix Corp., All Right Reserved; If you reference this document or any part of this document you must use the citation verbatim (including the link) "© Copyright 2008-2009 Vyper Logix Corp., All Right Reserved."
Notice: This source code contained in this document is NOT open source and is NOT being distributed as open source.
122,241 lines of code and growing...