/usr/lib/python3/dist-packages/twisted/python/__pycache__
NameSizeModeActions
compat.cpython-310.pyc153980644editdlrm
components.cpython-310.pyc143640644editdlrm
constants.cpython-310.pyc4680644editdlrm
context.cpython-310.pyc46570644editdlrm
deprecate.cpython-310.pyc252210644editdlrm
failure.cpython-310.pyc189600644editdlrm
fakepwd.cpython-310.pyc72920644editdlrm
filepath.cpython-310.pyc520500644editdlrm
formmethod.cpython-310.pyc127170644editdlrm
htmlizer.cpython-310.pyc35820644editdlrm
lockfile.cpython-310.pyc51380644editdlrm
log.cpython-310.pyc230160644editdlrm
logfile.cpython-310.pyc104590644editdlrm
modules.cpython-310.pyc254690644editdlrm
monkey.cpython-310.pyc23150644editdlrm
procutils.cpython-310.pyc13890644editdlrm
randbytes.cpython-310.pyc37350644editdlrm
rebuild.cpython-310.pyc55780644editdlrm
reflect.cpython-310.pyc191270644editdlrm
release.cpython-310.pyc15250644editdlrm
roots.cpython-310.pyc89330644editdlrm
runtime.cpython-310.pyc56170644editdlrm
sendmsg.cpython-310.pyc25800644editdlrm
shortcut.cpython-310.pyc24640644editdlrm
syslog.cpython-310.pyc33680644editdlrm
systemd.cpython-310.pyc30510644editdlrm
text.cpython-310.pyc42690644editdlrm
threadable.cpython-310.pyc35200644editdlrm
threadpool.cpython-310.pyc105020644editdlrm
url.cpython-310.pyc2790644editdlrm
urlpath.cpython-310.pyc92820644editdlrm
usage.cpython-310.pyc286350644editdlrm
util.cpython-310.pyc279390644editdlrm
versions.cpython-310.pyc3560644editdlrm
win32.cpython-310.pyc48410644editdlrm
zippath.cpython-310.pyc91460644editdlrm
zipstream.cpython-310.pyc88260644editdlrm
_appdirs.cpython-310.pyc8620644editdlrm
_inotify.cpython-310.pyc25800644editdlrm
_pydoctor.cpython-310.pyc57500644editdlrm
_release.cpython-310.pyc181330644editdlrm
_shellcomp.cpython-310.pyc188550644editdlrm
_textattributes.cpython-310.pyc106420644editdlrm
_tzhelper.cpython-310.pyc33850644editdlrm
_url.cpython-310.pyc2690644editdlrm
__init__.cpython-310.pyc5460644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/python/__pycache__/fakepwd.cpython-310.pyc (7292B)
o bL@sTdZddlmZddgZGdddZGdddZGdd d ZGd ddZd S) zM L{twisted.python.fakepwd} provides a fake implementation of the L{pwd} API. )List UserDatabaseShadowDatabasec@sPeZdZdZdededededededed d fd d Zd efd dZddZd S) _UserRecordz L{_UserRecord} holds the user data for a single user in L{UserDatabase}. It corresponds to the C{passwd} structure from the L{pwd} module. See that module for attribute documentation. namepassworduidgidgecoshomeshellreturnNcCs.||_||_||_||_||_||_||_dSNpw_name pw_passwdpw_uidpw_gidpw_gecospw_dirpw_shell)selfrrrr r r r r8/usr/lib/python3/dist-packages/twisted/python/fakepwd.py__init__s  z_UserRecord.__init__cCdS)Nrrrrr__len__'z_UserRecord.__len__cCs$|j|j|j|j|j|j|jf|Srrrindexrrr __getitem__*sz_UserRecord.__getitem__ __name__ __module__ __qualname____doc__strintrrr"rrrrrs*  rc@seZdZUdZeeed<dddZdeded e d e d ed ed eddfddZ d e defddZ dedefddZ deefddZ dS)rz L{UserDatabase} holds a traditional POSIX user data in memory and makes it available via the same API as L{pwd}. @ivar _users: A C{list} of L{_UserRecord} instances holding all user data added to this database. _usersr NcC g|_dSrr*rrrrrA zUserDatabase.__init__usernamerrr r r r c Cs |jt|||||||dS)a Add a new user record to this database. @param username: The value for the C{pw_name} field of the user record to add. @param password: The value for the C{pw_passwd} field of the user record to add. @param uid: The value for the C{pw_uid} field of the user record to add. @param gid: The value for the C{pw_gid} field of the user record to add. @param gecos: The value for the C{pw_gecos} field of the user record to add. @param home: The value for the C{pw_dir} field of the user record to add. @param shell: The value for the C{pw_shell} field of the user record to add. N)r*appendr)rr.rrr r r r rrraddUserDs"zUserDatabase.addUsercCs$|jD] }|j|kr|Sqt)zH Return the user record corresponding to the given uid. )r*rKeyError)rrentryrrrgetpwuidjs  zUserDatabase.getpwuidrcCs@t|tstdt||jD] }|j|kr|Sqt)zM Return the user record corresponding to the given username. z%getpwuam() argument must be str, not ) isinstancer( TypeErrortyper*rr1)rrr2rrrgetpwnamss   zUserDatabase.getpwnamcC|jS)z4 Return a list of all user records. r,rrrrgetpwall~zUserDatabase.getpwallr N)r$r%r&r'rr__annotations__rr(r)r0r3r7r9rrrrr6s0    &  c@sXeZdZdZdededededededed ed ed d fd dZd efddZddZd S) _ShadowRecordz L{_ShadowRecord} holds the shadow user data for a single user in L{ShadowDatabase}. It corresponds to C{spwd.struct_spwd}. See that class for attribute documentation. r.r lastChangeminmaxwarninactexpireflagr Nc Cs:||_||_||_||_||_||_||_||_| |_dSr sp_namsp_pwd sp_lstchgsp_minsp_maxsp_warnsp_inact sp_expiresp_flag rr.rr>r?r@rArBrCrDrrrrs  z_ShadowRecord.__init__cCr)N rrrrrrrz_ShadowRecord.__len__c Cs,|j|j|j|j|j|j|j|j|jf |SrrEr rrrr"s z_ShadowRecord.__getitem__r#rrrrr=s2    r=c@steZdZUdZeeed<dddZdeded e d e d e d e d e de de ddfddZ dedefddZ ddZ dS)rz L{ShadowDatabase} holds a shadow user database in memory and makes it available via the same API as C{spwd}. @ivar _users: A C{list} of L{_ShadowRecord} instances holding all user data added to this database. @since: 12.0 r*r NcCr+rr,rrrrrr-zShadowDatabase.__init__r.rr>r?r@rArBrCrDc Cs$|jt||||||||| dS)a Add a new user record to this database. @param username: The value for the C{sp_nam} field of the user record to add. @param password: The value for the C{sp_pwd} field of the user record to add. @param lastChange: The value for the C{sp_lstchg} field of the user record to add. @param min: The value for the C{sp_min} field of the user record to add. @param max: The value for the C{sp_max} field of the user record to add. @param warn: The value for the C{sp_warn} field of the user record to add. @param inact: The value for the C{sp_inact} field of the user record to add. @param expire: The value for the C{sp_expire} field of the user record to add. @param flag: The value for the C{sp_flag} field of the user record to add. N)r*r/r=rOrrrr0s (zShadowDatabase.addUsercCsBt|tstdt||jD] }|j|kr|Sqt|)zT Return the shadow user record corresponding to the given username. z%getspnam() argument must be str, not )r4r(r5r6r*rFr1)rr.r2rrrgetspnams   zShadowDatabase.getspnamcCr8)z; Return a list of all shadow user records. r,rrrrgetspallr:zShadowDatabase.getspallr;) r$r%r&r'rr=r<rr(r)r0rQrRrrrrrs6     . N)r'typingr__all__rrr=rrrrrs (O.