| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/root/proc/1/root/lib64/python3.12/dbm/__pycache__/ |
Upload File : |
�
�֦iJ- � �~ � d Z ddlZddlZddlZddlZddgZ dZ
eZ G d� dej j � Zd d�Zy)
a� A dumb and slow but simple dbm clone.
For database spam, spam.dir contains the index (a text file),
spam.bak *may* contain a backup of the index (also a text file),
while spam.dat contains the data (a binary file).
XXX TO DO:
- seems to contain a bug when updating...
- reclaim free space (currently, space once occupied by deleted or expanded
items is never reused)
- support concurrent access (currently, if two processes take turns making
updates, they can mess up the index)
- support efficient access to large databases (currently, the whole index
is read when the database is opened, and some updates rewrite the whole index)
- support opening for read-only (flag = 'm')
� N�error�openi c � � e Zd ZeZeZdd�Zd� Zd� Zd� ZeZ d� Z
d� Zd� Zd� Z
d � Zd
� Zd� Zd� Zd
� Zd� Zd� ZeZd� Zd� ZeZd� Zd� Zd� Zy)� _Databasec �� � | j j |� }|| _ |dk( | _ |dz | _ |dz | _ |dz | _ d | _ | j |� | j |� y )N�rs .dirs .dats .bak)
�_os�fsencode�_mode� _readonly�_dirfile�_datfile�_bakfile�_index�_create�_update)�self�filebasename�mode�flags �!/usr/lib64/python3.12/dbm/dumb.py�__init__z_Database.__init__0 ss � ��x�x�(�(��6����
��#�+��� %�w�.��
� %�w�.��
�$�w�.��
� ���
���T�����T�� c �� � |dk( r>| j | j | j fD ] } t j |� � t
j | j dd�� }|j � y # t
$ r Y �Zw xY w# t
$ r[ |dvr� t
j | j dd�� 5 }| j | j � d d d � Y y # 1 sw Y Y y xY ww xY w)N�nr �Latin-1��encoding��cr �w)
r r r
r �remove�OSError�_ior �close�_chmod)r r �filename�fs r r z_Database._createJ s� � ��3�;�!�]�]�D�M�M�4�=�=�I����J�J�x�(� J� ��������i�@�A�
�G�G�I�� � ����
� +��:�%�����$�-�-��y�A�Q����D�M�M�*� B�A�A�� +�s; �A8�"B �8 B�B�0C+�7C�C+�C' �"C+�'C+c �j � d| _ i | _ t j | j dd�� }|5 |D ]J }|j � }t
j |� \ }}|j d� }|| j |<