Tryag File Manager
Home
-
Turbo Force
Current Path :
/
proc
/
self
/
root
/
usr
/
lib
/
python2.4
/
Upload File :
New :
File
Dir
//proc/self/root/usr/lib/python2.4/site.pyo
mò ‚=5Dc @ s d Z d k Z d k Z 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( s@ 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, 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 (mainly Mac and Windows), it uses just sys.prefix (and sys.exec_prefix, if different, but this is unlikely). 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/python1.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/python1.5/site-packages/bar /usr/local/lib/python1.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. Nc G s4 t i i t i i | Œ ƒ } | t i i | ƒ f S( N( t ost patht abspatht joint pathst dirt normcase( R R ( ( t /usr/lib/python2.4/site.pyt makepathA s c C sS xL t i i ƒ D]; } y t i i | i ƒ | _ Wq t j o q q Xq Wd S( s6 Set all module' __file__ attribute to an absolute pathN( t syst modulest valuest mR R R t __file__t AttributeError( R ( ( R t abs__file__E 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 absoluteN( t Lt sett known_pathsR R R R t dircaset appendt add( R R R R ( ( R t removeduppathsM s c C s_ 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 :-)( s get_platforms build/lib.%s-%.3siÿÿÿÿN( t distutils.utilt get_platformR t versiont sR R R t dirnameR ( R R ( ( R t addbuilddira 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.pathN( R t dR R R R t isdirR R R t TypeError( R R R ( ( R t _init_pathinfoi 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( R t NoneR t resetR R R t sitedirt namet fullnamet opent ft IOErrort linet startswitht rstripR R R t existsR R R t close( R&