;ς
ωΨΉBc           @   sη   d  k  Z  d  k Z d  k Z d  k Z d k Td   Z d e i d d  Z d e i d d  Z	 d   Z
 d e i d d  Z e i i e i d	  d
 e e i d  Z e   e   e d j o e	   e   e   GHn d  S(   N(   s   *c          C   s³   d } d } d }  x t i D]y } | i d d  } yW d } | d d j o< | d 7} | | } | | | d d 7} | | d }  n Wq q Xq W| | i	 d  |  f Sd  S(   Ns    s   /i   i    i   s   , i   (
   s   PL2_BGP_PathRoots   PL2_BGP_statPathObjs   PL2_BGP_nodePaths   PL2_inis   PL2_BGP_statPaths   xs   splits   paths   ys   strip(   s   PL2_BGP_nodePaths   PL2_BGP_statPathObjs   PL2_BGP_PathRoots   paths   ys   x(    (    s   C:\Python\PL\PL2_config.pys   splitBGPstatPath   s     
 

s   datas	   PL2configc         C   s4   t  i i |   o t |   n t |  d  d  S(   Ns    already exist !(   s   oss   paths   existss   filenames   savePL2Configs   debugMsg(   s   filename(    (    s   C:\Python\PL\PL2_config.pys   createPL2ConfigIfNotExist    s    c         C   sέ  y½t  d |   t |  d  } | i d  | i d t t i  d  t   \ } } } | i d t |  d  | i d t |  d  | i d t |  d  | i d  | i d	  | i d
 t t i  d  | i d t t i  d  | i d t t i  d  | i d t t i  d  | i d  | i d  | i d t t i  d  | i d t t i  d  | i d  | i d  | i d t t i  d  | i d  | i d  | i d t t i  d  | i d t t i  d  | i d t t i  d  | i d t t i  d  | i d t t i  d  | i d  | i d  | i d  | i d  | i   Wn t  d |  d  n Xd  S(   Ns	   Creating s   ws4   # ----------- BGP Statistics ----------------------
s   PL2_BGP_statPathId = s   
s   PL2_BGP_PathRoot = s   PL2_BGP_statPathObj = s   PL2_BGP_nodePath = s5   # ---------- debug ---------------------------------
s   debug = s   debugChannel = s   debugHost = s   debugPort = s5   # ---------- CGI-query default values --------------
s   default_reverseLookup = s   default_printhostname = s5   # ---------- development ---------------------------
s   development = s5   # ------------- Environment ------------------------
s   popUpMenu = s
   toolBox = s   textButtons = s   webStatsLayout = s   language = s   end
s'   ************ Error writing configfile: s    ***************(   s   debugMsgs   filenames   opens
   outputfiles   writes   strs   PL2_inis   PL2_BGP_statPathIds   splitBGPstatPaths   PL2_BGP_PathRoots   PL2_BGP_statPathObjs   PL2_BGP_nodePaths   debugs   debugChannels	   debugHosts	   debugPorts   default_reverseLookups   default_printhostnames   developments	   popUpMenus   toolBoxs   textButtonss   webStatsLayouts   languages   close(   s   filenames
   outputfiles   PL2_BGP_PathRoots   PL2_BGP_nodePaths   PL2_BGP_statPathObj(    (    s   C:\Python\PL\PL2_config.pys   savePL2Config&   sH    c         C   sZ   g  } xD | i d  D]3 } d |  d | i   d | } | i |  q W| t	 _
 d  S(   Ns   ,s   /(   s   PL2_BGP_statPathObjs   statPathObjs   splits   xs   PL2_BGP_PathRoots   strips   PL2_BGP_nodePaths   paths   appends   PL2_inis   PL2_BGP_statPath(   s   PL2_BGP_PathRoots   statPathObjs   PL2_BGP_nodePaths   xs   PL2_BGP_statPathObjs   path(    (    s   C:\Python\PL\PL2_config.pys   buildBgpPathObjT   s      c         C   sλ  y t  |  d  } Wn t d |  d  n Xyx_n oW| i   } | o Pq5 | i   } | d  d j oy1 | i d  \ } } | i   } | i   } Wn d } d } n Xy$ | d j o t
 |  t _ n Wn n Xy | d	 j o
 | } n Wn n Xy | d
 j o
 | } n Wn n Xy | d j o
 | } n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy | d j o | t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy | d j o | t _ n Wn n Xy | d j o | t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy$ | d j o t
 |  t _ n Wn n Xy | d j o n WqqXq5 q< Wt | | |  t d |   Wn t d |  d  n Xy | i   Wn n Xd  S(   Ns   rs!   ************ Error opening file: s    ***************i   s   #s   =s    s   PL2_BGP_statPathIds   PL2_BGP_PathRoots   PL2_BGP_nodePaths   PL2_BGP_statPathObjs   debugs   debugChannels	   debugHosts	   debugPorts   default_reverseLookups   default_printhostnames   developments	   popUpMenus   toolBoxs   textButtonss   webStatsLayouts   languages   ends"   Webstats config loaded from file: s!   ************ Error reading file: (   s   opens   filenames   cfg_files   debugMsgs   readlines   cfg_lines   strips   splits   labels   values   ints   PL2_inis   PL2_BGP_statPathIds   PL2_BGP_PathRoots   PL2_BGP_nodePaths   statPathObjs   debugs   debugChannels	   debugHosts	   debugPorts   default_reverseLookups   default_printhostnames   developments	   popUpMenus   toolBoxs   textButtonss   webStatsLayouts   languages   buildBgpPathObjs   close(   s   filenames   PL2_BGP_nodePaths   cfg_lines   values   labels   PL2_BGP_PathRoots   cfg_files   statPathObj(    (    s   C:\Python\PL\PL2_config.pys   readPL2Config\   sβ     
	 i    i   c         C   s½  d t    }	 d } d } y t | d  } Wn d G| GHn Xyy xr n oj | i   } |	 | d 7}	 | p
 | d j o Pn | i d	  \ } } | d
 j o | i   } qE qL WWn d G| GHn Xy | i   Wn n X|	 d | d 7}	 | t i d } y t | d  } Wn d G| GHn Xy_ | i   } |	 | d 7}	 | p
 | d j o
 d } n | i d  \ } }
 } | i   Wn d G| GHd } n X|	 d t    7}	 |	 Sd  S(   Nsκ  
<html>
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="brinet ab">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="sv">
<meta name="ROBOTS" content="All">
<meta name="RESOURCE-TYPE" content="document">
<meta name="distribution" content="GLOBAL">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Expires" content="Thu, 01 Dec 1994 16:00:00 GMT">
<link rel="STYLESHEET" href="../statistics.css" type="text/css">
<body bgcolor="#e0e0e0">

s   /etc/SYSTEMs    s   rs   Can't open file:i   s   <br>s   
s   =s	   PLSYSPATHs   Error reading file:s   PLSYSPATH = s   <br><br>s
   plsd.hostss	   127.0.0.1s    s5   
<br>

test test test
<br>

</body>
</head>
</html>

(   s   varss   HTMLs   filenames	   PLSYSPATHs   opens
   systemfiles   readlines   system_lines   splits   labels   values   strips   closes   oss   seps   addrfiles	   addr_lines   addrs   users   password(   s   file2recalls
   IP_addresss   environs   passwords   system_lines
   systemfiles	   PLSYSPATHs   values   filenames   HTMLs   users   addrfiles   labels	   addr_lines   addr(    (    s   C:\Python\PL\PL2_config.pys   testχ   sR     
	
s   __main__(   s   times   syss   os.paths   oss   PL2_inis   PL_debugs   splitBGPstatPaths   seps   createPL2ConfigIfNotExists   savePL2Configs   buildBgpPathObjs   readPL2Configs   paths   splits   argvs   Nones   environs   tests   __name__(
   s   createPL2ConfigIfNotExists   PL2_inis   buildBgpPathObjs   readPL2Configs   syss   splitBGPstatPaths   times   tests   savePL2Configs   os(    (    s   C:\Python\PL\PL2_config.pys   ?   s    					.	,Z