mň
zçCc           @   s  d  Z  d Z d Z y e Wn d- \ Z Z n Xy d k Z d k Z d k Z d k Z d k	 Z	 e i
 i e i
 i e	 i e i    d d d   e e e i
  Z d	 k l Z l Z Wn1 y e i i d
 e  Wn e GHn X  n Xe i
 i e i d  d Z e i
 i e  d Z e i d  i e  i   Z d   Z d k Z h  d d <d d <d d <d d <d d <d d <Z  d d d d d g Z! d d d  d! d" g Z" d# d$ g Z# d%   Z$ d&   Z% d'   Z& d(   Z' e( d) j o e Z) e i d Z* e e j oR yD e+ e*  o3 e, d* e* d  o e i d Z) e i d+ Z* n WqhqhXn e, d, e) e e- e*   f  n d S(.   ss    simple implementation of Bernard Lietaer's ROCS system

    probably not useful due to lack of secure transactionss>  
    rocs -- simple implementation of Bernard Lietaer's ROCS system
    Copyright (C) 2005  John Comeau <jc.jcomeau.com>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    s7   Not all needed libraries found, upgrade or check path: i   i    Ni   t   libt   python(   s   gpls	   jclicenses   %s
s   [0-9A-Za-z]+c          G   s   t  S(   N(   t   False(   t   whatever(    (    t	   ./rocs.pyt
   DebugPrint2   s    t   hoarding_thresholdi,  t   hoarding_demurragef0.02t   freeloading_thresholdi˙˙˙t   freeloading_demurragef0.040000000000000001t   suspension_thresholdij˙˙˙t   arbitration_quorumf0.20000000000000001t   transactt   registert   usaget   listt   reportt   claimedt   acknowledgedt
   challengedt   arbitrated_grantedt   arbitrated_deniedt   currentt	   suspendedc          G   s   d t  |   GHd  S(   Ns   transacting %s(   t   reprt   args(   R   (    (    R   R   D   s    c          G   s   d t  |   GHd  S(   Ns   registering %s(   R   R   (   R   (    (    R   R   G   s    c          G   sf   t  |  d  } t i } | d j o t i } n | i d t  | d j o t i	 |  n d  S(   Ni    s%   Usage: %s transact | register | help
(
   t   intR   t
   errorlevelt   syst   stdoutt   outputt   stderrt   writet   commandt   exit(   R   R   R   (    (    R   R   J   s    	  c          G   s=   t  d t t t  t  d t t f |   d t |   GHd S(   s   implement the ROCS commandss   self, command, originalselfs.   Running 'pytest %s.%s' should show this; args:s   args: %sN(   R   t   selfR!   t   originalselfR   R   (   R   (    (    R   t   rocsQ   s
     t   __main__s   type(%s) == types.FunctionTypei   s   %s%s(   i   i    (.   t   __doc__t	   Copyrightt   errormessaget   TrueR   R   t   ost   typest   ret   pwdt   patht   appendt   joint   getpwuidt   geteuidR   t   com.jcomeaut   gplt	   jclicenseR   R    t   splitt   argvR#   t   splitextR!   t   compilet   searcht   groupR$   R   t   timet   defaultst   commandst   transaction_statest   member_statesR   R   R   R%   t   __name__t   functionR   t   lent   evalt   tuple(   R   R(   R   R5   R@   R   R-   R   R*   RC   RA   R$   R   R   R.   R,   R?   R   R)   R%   R6   R!   R>   R=   R+   R#   (    (    R   t   ?   sN   -5			<				"" 