In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "Python program development problem example analysis". In daily operation, I believe that many people have doubts in Python program development problem example analysis. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "Python program development problem example analysis". Next, please follow the editor to study!
Due to personal preference and familiarity with ubuntu, the following development process uses ubuntu both in the host environment and on the moblin platform. However, moblin 2.0 seems to no longer use ubuntu, but only supports fedora, somehow. Start MIC,Platform, select memlow-lpia-ubuntu-hardy,target, select ububtu-mobile, and generate it automatically. The waiting time is called a long time.
This is also the good or bad of the tool, before typing the command, cross-compiled almost all the modules of the Gnome Mobile framework, suffered a lot of pain, but not idle to do; and automatically generated by the tool, a lot of leisure, do not care much about the details of the compilation.
I'm just looking forward to finishing it as soon as possible so that I can do the test. Next, generate the Image file and select Live RW USB. At this time thought that the job is done, click Launch VM, there is no response. I'm depressed. Google, running KVM requires CPU to support Intel VT, and you don't have MID on hand, so try Qemu.
Throw the compiled image file (the file selected when Launch VM) directly to Qemu, and the result is "checking device / dev/sda for installation source...". What's the problem? Hanging the image file locally does not see why. In fact, it is expected that Qemu will not be able to run directly out of the screen (here there may be problems with the use of Qemu qemu-hda moblin.img).
Because the kernel and file system are generated by MIC, many details of processing can not be known, but there are always compiled files. I think we can create the files needed for Qemu simulation according to the files generated by MIC. The linux startup process went smoothly, prompting for a user name and password. Mount the root file system 1G.img again and delete shadow? In a more civilized way, copy native / etc/shadow to ${Mount Dir} / etc.
Boot again, get shell, but still no graphical interface (if MID needs to start X manually, it feels a little superfluous, the problem may be the configuration, without digging into it, run X again). Without / etc/init.d/gdm, let's just startx, the frustrating thing happens again, "(EE): no valid modes found". I have no choice but to mount the root file system again.
Add Modes "800x480" (just the mode I added, I don't know if other patterns are supported). Finally see the picture, perhaps because of some trouble, I think the interface of Moblin is still very beautiful. Using the same method, you can use Qemu to simulate other Platform (not validated one by one, tested netbook-lpia-moblin2).
The reason for choosing Python is that, first of all, it is easy to transplant. The Python interpreter converts the source code into bytecode, and then translates it into machine language and runs it. You don't have to worry about how to compile the program, how to connect to the correct library, etc., just copy the Python program to the target computer, and it will work.
Secondly, I have been writing Python recently, thinking that it can quickly turn ideas into reality, so I don't bother to use C; * Python is a very popular interpretive language, and we can see that the programming interface of Python is retained in the prototype of Gnome Mobile.
Class Category (models.Model): id = models.AutoField ('id', primary_key=True) name = models.CharField (maxlength=50) code = models.CharField (maxlength=50) parentCategory = models.ForeignKey (' self', 'id' Null=True) enable = models.BooleanField () def _ _ str__ (self): return self.name class Admin: list_display = ('id',' name', 'code',' parentCategory')
Python provides system call, thread, GTK and other modules, which can be used to build a prototype to verify the feasibility of the idea. Of course, it can also be easily applied to the development of Moblin platform. Before developing an application, the configuration environment is essential, and there is no doubt that the tool used is Moblin Image Creator, and you need to make sure that the required tools and libraries are installed.
Including Python, the core module (python-dbus python-gtk2 python-hildon), since the previously selected platform is ubuntu, you only need to use apt-get to easily install these packages. At this point, the environment for developing Python on moblin is basically built. Next, create an icon on the desktop and launch the corresponding Python program, no doubt Hello World.
At this point, the study of "example analysis of Python program development problems" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.