Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/site.pyc |
hRc @ s d Z d d k Z d d k Z d d k Z d Z d Z d Z d Z d Z d Z d d Z d Z d Z d Z d e f d YZ d Z d e f d YZ d Z d Z d Z d Z d Z e d Z e d j o e n d S( sN Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or modules that needed to use site-specific modules would place ``import site'' somewhere near the top of their code. Because of the automatic import, this is no longer necessary (but code that does it still works). This will append site-specific paths to the module search path. On Unix (including Mac OSX), it starts with sys.prefix and sys.exec_prefix (if different) and appends lib/python<version>/site-packages as well as lib/site-python. On other platforms (such as Windows), it tries each of the prefixes directly, as well as with lib/site-packages appended. The resulting directories, if they exist, are appended to sys.path, and also inspected for path configuration files. A path configuration file is a file whose name has the form <package>.pth; its contents are additional directories (one per line) to be added to sys.path. Non-existing directories (or non-directories) are never added to sys.path; no directory is added to sys.path more than once. Blank lines and lines beginning with '#' are skipped. Lines starting with 'import' are executed. For example, suppose sys.prefix and sys.exec_prefix are set to /usr/local and there is a directory /usr/local/lib/python2.5/site-packages with three subdirectories, foo, bar and spam, and two path configuration files, foo.pth and bar.pth. Assume foo.pth contains the following: # foo package configuration foo bar bletch and bar.pth contains: # bar package configuration bar Then the following directories are added to sys.path, in this order: /usr/local/lib/python2.5/site-packages/bar /usr/local/lib/python2.5/site-packages/foo Note that bletch is omitted because it doesn't exist; bar precedes foo because bar.pth comes alphabetically before foo.pth; and spam is omitted because it is not mentioned in either path configuration file. After these path manipulations, an attempt is made to import a module named sitecustomize, which can perform arbitrary additional site-specific customizations. If this import fails with an ImportError exception, it is silently ignored. iNc G s4 t i i t i i | } | t i i | f S( N( t ost patht abspatht joint normcase( t pathst dir( ( s /usr/local/lib/python2.5/site.pyt makepathB s c C sj xc t i i D]R } t | d o q n y t i i | i | _ Wq t j o q q Xq Wd S( s6 Set all module' __file__ attribute to an absolute patht __loader__N( t syst modulest valuest hasattrR R R t __file__t AttributeError( t m( ( s /usr/local/lib/python2.5/site.pyt abs__file__F s c C sn g } t } xN t i D]C } t | \ } } | | j o | i | | i | q q W| t i (| S( sK Remove duplicate entries from sys.path along with making them absolute( t setR R R t appendt add( t Lt known_pathsR t dircase( ( s /usr/local/lib/python2.5/site.pyt removeduppathsP s c C sb d d k l } d | t i f } t i i t i i t i d | } t i i | d S( sb Append ./build/lib.<platform> in case we're running in the build dir (especially for Guido :-)i( t get_platforms build/lib.%s-%.3sN( t distutils.utilR R t versionR R R t dirnameR ( R t s( ( s /usr/local/lib/python2.5/site.pyt addbuilddird s (c C st t } xd t i D]Y } y: t i i | o# t | \ } } | i | n Wq t j o q q Xq W| S( sD Return a set containing all existing directory entries from sys.path( R R R R t isdirR R t TypeError( t dR R ( ( s /usr/local/lib/python2.5/site.pyt _init_pathinfol s c B s6 | d j o e d } n d } e i i | | } y e | d } Wn e j o d Sn Xz x | D] } | i d o qp n | i d o | d Uqp n | i } e | | \ } } | | j o4 e i i | o! e i i | | i | qp qp WWd | i X| o d } n | S( so Add a new path to known_paths by combining sitedir and 'name' or execute sitedir if it starts with 'import'i i t rUNt #t import( t NoneR! R R R t opent IOErrort startswitht rstripR t existsR R R t close( t sitedirt nameR t resett fullnamet ft lineR R ( ( s /usr/local/lib/python2.5/site.pyt addpackagex s4 c C s | d j o t } d } n d } t | \ } } | | j o t i i | n y t i | } Wn t i j o d Sn X| i x9 | D]1 } | i t i d o t | | | q q W| o d } n | S( sT Add 'sitedir' argument to sys.path if missing and handle .pth files in 'sitedir'i i Nt pth( R% R! R R R R R t listdirt errort sortt endswitht extsepR2 ( R, R R. t sitedircaset namesR- ( ( s /usr/local/lib/python2.5/site.pyt addsitedir s&