Site-specific configuration

Site-specific configuration

  site.py会被自动导入。通过-S选项可阻止此行为。

  Importing this module will append site-specific paths to the module search path and add a few builtins.

1、四个目录。

  It starts by constructing up to 4 directories from a head and a tail part. For the head part, it uses sys.prefix and sys.exec_prefix; empty heads are skipped. For the tail part, it uses the empty string and then lib/site-packages (on Windows) or lib/pythonX.Y/site-packages and then lib/site-python (on Unix and Macintosh). For each of the distinct head-tail combinations, it sees if it refers to an existing directory, and if so, adds it to sys.path and also inspects the newly added path for configuration files.

2、.pth文件。

  A path configuration file is a file whose name has the form name.pth and exists in one of the four directories mentioned above; its contents are additional items (one per line) to be added to sys.path. Non-existing items are never added to sys.path, and no check is made that the item refers to a directory rather than a file. No item is added to sys.path more than once. Blank lines and lines beginning with # are skipped. Lines starting with import (followed by space or tab) are executed.

时间: 2024-10-24 11:11:58

Site-specific configuration的相关文章

How to Automate IIS 7 Configuration with .NET

How to Automate IIS 7 Configuration with .NET Are you tired of manually configuring IIS sites (adding Web sites, application pools, virtual directories and so on)? Use C# and the Microsoft.Web.Administration Namespace to simplify your life (or at lea

Python.Module.site

site " This module is automatically imported during initialization. The automatic import can be suppressed using the interpreter’s -S option. Importing this module will append site-specific paths to the module search path and add a few builtins. &quo

[Sprint] Properties for project configuration

We might have some project specific configuration need to setup. The good approach to do this in Sprint is using 'Proptries'. In resouces/applicationContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http:/

[从零搭网站五]http网站Tomcat配置web.xml和server.xml

点击下面连接查看从零开始搭网站全系列 从零开始搭网站 上一章我们在CentOS下搭建了Tomcat,但是还是没有跑起来...那么这一章就把最后的配置给大家放上去. 有两种方式:一种是用 rm -f 给这两个文件删掉,再用vim建新的出来.另一种是vim编辑,输入:set nu 显示行号,再输入:1,最后一行的行号d 把全文删掉. 然后再复制粘贴我给你们的配置文件就行. web.xml  , 完全不用修改,直接复制就行了: <?xml version="1.0" encoding=

Python著名的lib和开发框架(均为转载)

第一,https://github.com/vinta/awesome-python Awesome Python A curated list of awesome Python frameworks, libraries, software and resources. Inspired by awesome-php. Awesome Python Admin Panels Algorithms and Design Patterns Anti-spam Asset Management A

Yarn 详解

唐 清原, 咨询顾问 简介: 本文介绍了 Hadoop 自 0.23.0 版本后新的 map-reduce 框架(Yarn) 原理,优势,运作机制和配置方法等:着重介绍新的 yarn 框架相对于原框架的差异及改进:并通过 Demo 示例详细描述了在新的 yarn 框架下搭建和开发 hadoop 程序的方法. 读者通过本文中新旧 hadoop map-reduce 框架的对比,更能深刻理解新的 yarn 框架的技术原理和设计思想,文中的 Demo 代码经过微小修改即可用于用户基于 hadoop 新

hadoop&spark安装(上)

硬件环境: hddcluster1 10.0.0.197 redhat7 hddcluster2 10.0.0.228 centos7  这台作为master hddcluster3 10.0.0.202 redhat7 hddcluster4 10.0.0.181 centos7 软件环境: 关闭所有防火墙firewall openssh-clients openssh-server java-1.8.0-openjdk java-1.8.0-openjdk-devel hadoop-2.7.

29.Hadoop之HDFS集群搭建笔记

0.修改IP,主机名,hosts文件 setup        修改网卡IP service  network  restart        重启网络服务使IP生效 vim /etc/sysconfig/network修改主机名 vim /etc/hosts/修改hosts文件 192.168.126.128 hadoop001 192.168.126.129 hadoop002 192.168.126.130 hadoop003 192.168.126.131 hadoop004 1.安装j

8) pom.xml

http://maven.apache.org/xsd/maven-4.0.0.xsd <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://maven.apache.org/POM/4.0.0" elementFormDefault="qualified" targetNamespace="http://maven.apache.org/POM/

Hadoop新MapReduce框架Yarn详解

简介 本文介绍了Hadoop自0.23.0版本后新的MapReduce框架(Yarn)原理,优势,运行机制和配置方法等,着重介绍新的yarn框架相对于原框架的差异及改进,并通过Demo示例详细介绍了在新的Yarn框架下搭建和开发Hadoop程序的方法.读者通过本文中新旧Hadoop MapReduce框架的对比,更深刻理解新的yarn框架技术与那里和设计思想,文中的Demo代码经过微小修改既可用于用户基于Hadoop新框架的实际生产环境. Hadoop MapReduceV2(Yarn)框架简介