In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "python script framework webpy url mapping example analysis", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "python script framework webpy url mapping example analysis"!
URL exact match (specific url)
/ index
URL fuzzy matching (you have no idea what's behind index, it doesn't return parameters at all)
/ index/\ d
URL band matching (there is mainly a'()', which mainly returns a parameter, which must be accepted in the class you are dealing with)
/ baidu/ (. *)
Instance import weburls= ('/ index','AbsoluteUrl','/ index/\ dcards,'/ index/ (. *)', 'GroupUrl') # specific url processing class class AbsoluteUrl: def GET (self): web.header (' Content-type','text/html) Charset=utf-8') return u'URL exactly matches the'# fuzzy url handling class class AmbiguousUrl: def GET (self): web.header ('Content-type','text/html) Charset=utf-8') return u'URL Fuzzy matching'# grouped url processing class class GroupUrl: def GET (self,name): # if you have a group match here, be sure to add a parameter to receive the parameter web.header ('Content-type','text/html) returned by you Charset=utf-8') return u'URL band matching -'+ nameapp=web.application (urls,globals ()) if _ _ name__ = ='_ main__': app.run () so far, I believe you have a deeper understanding of "url mapping example analysis of python script framework webpy". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.