+
    Dfj                         R t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
Ht  ! R R]4      t]! ]4       ! R R4      4       t]t ! R	 R
]P                  4      tR tR tR t. ROtR# )z`
Save and load Small OBjects to and from files, using various formats.

Maintainer: Moshe Zadka
N)	Interfaceimplementer)styles)logruntimec                   4   a  ] tR t^t o RtR tRR ltRtV tR# )IPersistablez9An object which can be saved in several formats to a filec                    R# zGSet desired format.

@type style: string (one of 'pickle' or 'source')
N styles   &7/usr/lib/python3/dist-packages/twisted/persisted/sob.pysetStyleIPersistable.setStyle           Nc                    R# )XSave object to file.

@type tag: string
@type filename: string
@type passphrase: string
Nr   )tagfilename
passphrases   &&&r   saveIPersistable.save!   r   r   r   NNN)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     C r   r   c                   L   a  ] tR t^*t o RtR tR tR tR tR t	R
R lt
R	tV tR# )
Persistentpicklec                    Wn         W n        R # N)originalname)selfr)   r*   s   &&&r   __init__Persistent.__init__.   s     	r   c                    Wn         R# r
   r   )r+   r   s   &&r   r   Persistent.setStyle2   s	    
 
r   c                    V'       d   TpVR ,           pWA3# V'       d,   V P                    RV RV 2pV P                    RV RV 2pWA3# V P                    RV 2pV P                    RV 2pWA3# )z-2-z-2..)r*   )r+   r   extr   	finalnames   &&&& r   _getFilenamePersistent._getFilename9   s     I 4'H "" ))AcU#cU3H99+Qse1SE2I "" ))Cu-H99+Qse,I""r   c                    \        VR 4      ;_uu_ 4       pV! V P                  V4       RRR4       R#   + '       g   i     R# ; i)wbN)openr)   )r+   r   dumpFuncfs   &&& r   	_saveTempPersistent._saveTempE   s.    (D!!QT]]A& "!!!s	   3A	c                N    V P                   R 8X  d   ^ RIHp RpW!3# RR lpRpW!3# )source)jellyToSourcetasc                 4    \         P                  ! W^4       R# )   N)r&   dump)objfiles   &&r   r:   &Persistent._getStyle.<locals>.dumpFuncP   s    Cq)r   tapr(   )r   twisted.persisted.aotr@   )r+   r:   r3   s   &  r   	_getStylePersistent._getStyleI   s4    ::!GC }	* C}r   Nc                   V P                  4       w  rEVe   \        R4      hV P                  W$V4      w  rb\        P                  ! RV P
                  ,           R,           V,           R,           4       V P                  W%4       \        P                  R8X  d<   \        P                  P                  V4      '       d   \        P                  ! V4       \        P                  ! W&4       \        P                  ! R4       R# )r   Nzpassphrase must be NonezSaving z application to z...win32zSaved.)rJ   	TypeErrorr5   r   msgr*   r<   r   platformTypeospathisfileremoverename)r+   r   r   r   r3   r:   r4   s   &&&&   r   r   Persistent.saveV   s     (!566"//sC		DII%(::YFNOx*7*rww~~i/H/HIIi 
		(&r   )r*   r)   r   r   )r   r   r   r   r   r,   r   r5   r<   rJ   r   r    r!   r"   s   @r   r%   r%   *   s-     E
#' r   r%   c                   0   a  ] tR t^mt o ^ tR tR tRtV tR# )_EverythingEphemeralc                    Wn         R# )zC
@param mainMod: The '__main__' module that this class will proxy.
NmainMod)r+   r[   s   &&r   r,   _EverythingEphemeral.__init__p   s	     r   c                     \        V P                  V4      #   \         dI    T P                  '       d   h \        P
                  ! R T,          4       \        P                  ! 4       u # i ; i)z#Warning!  Loading from __main__: %s)getattrr[   AttributeErrorinitRunr   rO   r   	Ephemeral)r+   keys   &&r   __getattr__ _EverythingEphemeral.__getattr__v   sT    	*4<<-- 	*|||=CD''))	*s    A+3A+*A+rZ   N)	r   r   r   r   r`   r,   rc   r    r!   r"   s   @r   rX   rX   m   s     G* *r   rX   c                *   RpVR8X  d   ^ RI Hp M\        P                  Rr#\	        W4      p\        \        P                  R,          4      pV\        P                  R&   ^Vn        T;_uu_ 4         V! V4      pVP                  \        P                  R&    RRR4       \        P                  ! 4        ^ Vn        \        XR4      pVe   VP                  V4       V#   TP                  \        P                  R&   i ; i  + '       g   i     Lq; i)zLoad an object from a file.

Deserialize an object from a file. The file can be encrypted.

@param filename: string
@param style: string (one of 'pickle' or 'source')
rr?   )unjellyFromSourcerb__main__N)rI   rg   r&   loadr9   rX   sysmodulesr`   r[   r   	doUpgrader   r   )r   r   mode_loadfpeevaluepersistables   &&      r   rj   rj      s     DDkk4t	h	B	ckk*5	6B CKK
BJ		1"IE ')jjCKK
# 
 BJud+KU#L ')jjCKK
# 
s$   1D3C ;D C??DD	c                    \        V 4      ;_uu_ 4       pVP                  4       pRRR4       RV /p\        XV R4      p\        WTV4       WA,          pV#   + '       g   i     L7; i)zLoad the value of a variable in a Python file.

Run the contents of the file in a namespace and return the result of the
variable named C{variable}.

@param filename: string
@param variable: string
N__file__exec)r9   readcompileeval)r   variablefileObjdatadcodeObjrr   s   &&     r   loadValueFromFiler      sU     
h7||~ 
	XAdHf-GQKEL 
s   AA$	c                 |    \         P                  P                  V 4      ^,          pRRRRRRRRRRRR	R
R	/V,          # )   z.tacpythonz.etacz.pyz.tapr&   z.etapz.tasr?   z.etas)rQ   rR   splitext)r   r3   s   & r   	guessTyper      sR    
''

8
$Q
'Cx 
 r   )r   rj   r%   
Persistantr   r   )r   rQ   r&   rk   zope.interfacer   r   twisted.persistedr   twisted.pythonr   r   r   r%   r   ra   rX   rj   r   r   __all__r   r   r   <module>r      sy    
  
 1 $ '9 & \; ; ;~ 
*6++ *(B$
r   