In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you what the Python source code compilation skills are, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.
The following is a detailed description of the Python source code programming skills, and the relevant spelling rules of the Python source code. First of all, let us understand what is the Python language, the so-called Python: is an object-oriented, literal computer programming language, but also a powerful and comprehensive general-purpose language.
Before this section begins, I would also like to talk about a topic that we have been talking about before and will continue to talk about in the future-status. We've been talking about it. Keep the user's state in a centralized place, especially in the case of large-scale cluster deployment, and the same is true for django, it can be said that this golden rule is not just for a particular language.
A framework, it should be a higher-level concept. So where can we put the status? at present, some popular choices are DB (memory table, or physical table), memcached, or cookie. However, these options are not easily interchangeable. For example, in the case of a large number of business data, it is not appropriate to put them in the Python source code, because it may exceed the limit of cookie size.
In memcached, unfortunately, memcached (in the case of slab) also has its own limitations. If the size span of state data is large, then data loss can occur, as ahuaxuan encountered a long time ago in the test environment. This does not happen because the online memcached is wide open, and the internal causes of such events have been described in great detail in another ahuaxuan article.
Well, on DB, obviously, the pressure of DB is also one of the issues that we need to consider. Of course, in addition to these mainstream options, we have a lot of other options, such as memcachedb, or timesten, or others. However, for such things as state, especially when state data is more important, we must deeply study and understand the storage technology of state data, otherwise we may encounter unexpected situations.
For example, a long time ago, I would not have thought that memcached is LRU for a certain slab (and I would also like to add that LRU is not really traversing the chunk linked list in slab, but only the first 50 data, purely for speed). At present, there are basically two deployment strategies for django, * one is to use mod_python to run django in the apache process, and the other is webserver+fastcgi.
These two approaches have their own advantages and disadvantages. In the mod_python model, our webserver must use apache,apache as the leader in the field of webserver for many years. The market share is also far higher than that of other webserver, but in recent years, several other webserver have sprung up, among which the more famous ones are ligttpd and nginx.
They all challenge apache with high performance and low memory consumption, and mod_python is a plug-in for apache, which limits our webserver to apache, but fortunately apache+mod_python is also a very stable solution. The second is webserver+fastcgi, where the webserver can be chosen at will, and most webserver provide support for fastcgi.
For example, we are familiar with lighttpd and nginx, and it is said that in many cases, FastCGI can provide better security and performance than mod_python. For small sites, FastCGI is more lightweight than Apache. It is said that the personal space of qq is realized by C++ plus fastcgi. Oh, where is the advantage of doing so? the processing speed of C++ will be very fast.
In other words, each fastcgi will process a request very quickly, for example, it takes 50 milliseconds to use python, while it may only take 20 milliseconds for C++ to process the request (this example may not be accurate, just to illustrate the characteristics of fastcgi). Although C++ is a bit troublesome in development, in terms of performance, C++ must be no1. From this example, we can see that the speed of using fastcgi depends on the speed of processing a request (nonsense, which is not the case).
Tkinter is a Python source code that interfaces with Tk. The Tkinter library provides an interface to Tk API, which belongs to Tcl/Tk 's GUI tool group. Tcl/Tk is a writing and graphics device developed by John Ousterhout. Tcl (tool Command language) is a macro language.
To simplify the development of complex programs under shell, the Tk toolkit is developed together with Tcl to simplify the design process of the user interface. The Tk toolkit consists of many different widgets, such as a button, a scroll bar, and so on. With these widgets provided by Tk, we can do GUI development quickly. Perl, Scheme and other languages also use the Tk library for GUI development. Tkinter is cross-platform and can be used on a variety of platforms.
Python Imaging Library (PIL)-Python source code provides powerful graphics processing capabilities, and provides a wide range of graphics file format support, the library can carry out graphics format conversion, printing and display. It can also deal with some graphic effects, such as zooming in, zooming out and rotating. It is a powerful tool for Python users to process images.
Pmw (Python megawidgets) Python Super GUI component set-an advanced GUI component built in python using the Tkinter module, each Pmw merges one or more Tkinter components to achieve more useful and complex functions.
The above content is what are the programming skills of Python source code? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.