First, the functionTo define a function:def Fun_name (para_list): codingdef fun_name (para_list): Coding return XXXUsing functions, Fun_name (para)Local variables, global variables are the same as C, local variables inside functions, files visible, global variables.Second, the moduleThe module is a collection of functions, first imported and then used, import time Time.asctime ()Three, the packagePackage: Contains multiple modules from the PIL import image to import an image module from
Import module:Print ('from thespam.py')money =read1 def (): print ( ' Spam->read1->money ',+) def read2 (): print ('spam->read2 calling Read ' ) read1 () def change (): Global money money =0spam.pyCall spam.pyMoney = 9999999ImportSpam#From the spam.py#first thing: Create a namespace to hold the name defined in the spam.py#second thing: Execute spam.py based on the namespace you just created#The third thing: Create a name spam point to the namespace, spam. The operation of the nam
First, install the XLRD
Address
After downloading, use the pip install .whl installation as well.
View Help:
>>> Import xlrd>>> Help (XLRD) to the Xlrd:name xlrdpackage CONTENTS biffh book CompDoc Formatt ING Formula Info licences sheet TimeMachine xldate xlsxfunctions count_records (filename, outfile=
The above method can be used to view the XLRD help information, there are some modules in the XLRD package, as well as some member variables, constants, functions.
Second,
XML to JSON? Is it hard to hear the pain, are the format of structured data necessary for this conversion? Yes, actually I also feel bored, but hands itch, always want to try. Online can also find a conversion tool called xmltodict, also very useful. My method is as follows, the principle is very simple, the code is also very short.XML file: Testxml.xmlPython code:From Xml.etree import ElementTree as Et;import json# reads the node from the XML file into JSON format and saves it to the file print
Gmpy2 need gmp.h mpfr.h mpc.h installation command: sudo apt-get install livmpfr-dev libmpc-devAfter successful, enter the installation command:pip install gmpy2If you encounter a package that cannot be located:Then enter the command: sudo gedit/etc/apt/sources.listPop up the file and add it at the end of the file:Deb http://Mirrors.ustc.edu.cn/kali kali-rolling main Non-free contribThen sudo apt-get update canInstallation of Python's Gmpy2 library under Linux and solutions to the inability to l
Binary installation file Download address: https://www.lfd.uci.edu/~gohlke/pythonlibs/
Problem: Pip installation error, XXXX is not a supported wheel on this platform
Possible cause 1: installed not corresponding to the Python version of the library, the downloaded library name CP27 representative python2.7, others the same.
Possible reason 2: This is the situation I have encountered (download the corresponding version of the library, and then still p
package three-step explanation"7, http://www.cnblogs.com/einyboy/archive/2012/09/13/2683015.html "Explain installation src.rpm"8, https://yq.aliyun.com/articles/43220 "How to make the source package into RPM package" later wrote a new blog post9, http://www.gkstk.com/article/wk-78500000726568.html "Linux software package management basic Operations Command get Started"10, http://studys.blog.51cto.com/9736817/1608958 "must See, software warehouse explanation"11, Http://os.51cto.com/art/201109/29
package, meta-package and frameworkThis article is translated from Packages, Metapackages and Frameworks. . Net Core is a platform made up of NuGet Packages. Some product experiences benefit from fine-grained definitions of code packages, while others benefit from coarse-grained definitions, both of which are useful and cannot be absolutely good or bad. therefore
Let's briefly describe the problem. I use the Ubuntu, source code compiled to install the Python3. I install some libraries that need to be installed by Apt-get, and this time I encounter problems with Python not finding these libraries.There is a simple article to look at: http://www.cnblogs.com/kevin922/p/3161411.html. It is said that some of the tools installed by the system, including the original Python
1. how many software packages have been installed? [Root @ localhost ~] Rpm-qa | wc-l217 2, how to get
1. how many software packages have been installed?
[root@localhost ~]# rpm -qa | wc -l217
2. how do I know which software packages are installed?
[root@localhost ~]# rpm -qa | sortacl-2.2.49-6.el6.x86_64aic94xx-firmware-30-2.el6.noarchatmel-firmware-1.3-7.el6.no
RPMQUERY-QL software name
Example:
[Root@localhost rpms]# RPM-QL Lynx
[Root@localhost rpms]# RPMQUERY-QL Lynx
4 Query The information of an installed package
Syntax format: RPM-QI software name
Example:
[Root@localhost rpms]# Rpm-qi Lynx
5 Check the configuration file of the installed software
Syntax format: RPM-QC software name
Example:
[Root@localhost rpms]# RPM-QC Lynx
6 View a document installation location where the software has been installed
Syntax format: RPM-QD software name
Example:
[
1. How many software packages have been installed?
[root@localhost ~]# rpm -qa | wc -l217
2. How do I know which software packages are installed?
[root@localhost ~]# rpm -qa | sortacl-2.2.49-6.el6.x86_64aic94xx-firmware-30-2.el6.noarchatmel-firmware-1.3-7.el6.noarchattr-2.4.44-7.el6.x86_64audit-2.2-2.el6.x86_64audit-libs-2.2-2.el6.x86_64authconfig-6.1.12-13.el6.x86_64b43-openfwwf-5.2-4.el6.noarchbasesystem-
One.There are a lot of different packages, how to access the classes between different packages? It is the default package when there is no package, the current directory is the default package, they are all in the same package to each other (access between different classes, call). Now what about the access between classes and classes in different packages?In th
For details about the install. Packages () function, see install the r package (install. Packages function)
R packages generally have two types:1 Binary Package: this package is a ready-to-use package, but its dependency is different from that on the platform, that is, win and Linux.2 source package: This type of package can be used across platforms, but it needs
NuGetNuGet is a tool that has been integrated into the VS development environment and is used directly to quickly install third-party packages, which are a set of DLLs and resources that the developers package, or package, that we use to NuGet to put the packages (DLLs and resources It is convenient to install directly into the specified project, and it is easy to upgrade with NuGet when the package is upda
This series of blogs is from: http://www.92csz.com/study/linux/Here, thank the original person to provide the introductory knowledgeThe purpose of this series of blogs is to extract the more commonly used LIUNX commands from the author's articles for their own study and review."RPM tool "RPM is the abbreviation for "Redhat package Manager", which can be guessed by name as Redhat company developed. RPM is a set of management programs that installs the package
running program want to run, you must set the location of the class, otherwise there is no result, is to set environment environment variables, set to the sub-directory can be)*//* How should classes in different packages be accessed? 4 notes written on the program *//* Features of package *//* Package can write many classes, a public, other private, so also has encapsulation *//* Summary of packageAccess to the package, access to the classes in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.