| Server IP : 118.27.122.248 / Your IP : 216.73.216.124 Web Server : Apache System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64 User : c9415830 ( 11735) PHP Version : 8.4.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/ |
Upload File : |
3
x2_� � - @ s d Z ddlZyddlZW n ek
r0 dZY nX yddljZW n ek
rX dZY nX yddljZ W n ek
r� dZ Y nX yddljZ
W n ek
r� dZ
Y nX ddlZyddlZW n ek
r� ddlZY nX ej
d Zdd� Zdd� Zedk�rejeej
dd� �� dS ) aM
Synopsis: %(prog)s [-h|-b|-g|-r|-a|-d] [ picklefile ] dbfile
Read the given picklefile as a series of key/value pairs and write to a new
database. If the database already exists, any contents are deleted. The
optional flags indicate the type of the output database:
-a - open using dbm (open any supported format)
-b - open as bsddb btree file
-d - open as dbm.ndbm file
-g - open as dbm.gnu file
-h - open as bsddb hash file
-r - open as bsddb recno file
The default is hash. If a pickle file is named it is opened for read
access. If no pickle file is named, the pickle input is read from standard
input.
Note that recno databases can only contain integer keys, so you can't dump a
hash or btree database using db2pickle.py and reconstitute it to a recno
database with %(prog)s unless your keys are integers.
� Nc C s t jjtt� � d S )N)�sys�stderr�write�__doc__�globals� r r �</opt/alt/python36/lib64/python3.6/Tools/scripts/pickle2db.py�usage4 s r c # C s y"t j | dddddddg�\}} W n t jk
r> t� dS X t| �d ksXt| �d
krbt� dS t| �dkr~tj}| d }nDyt| d d�}W n( tk
r� tjj d| d � dS X | d }d }�xj|D �]`\}}|d"k�ry
t
j}W n" tk
�r tjj d� dS X q�|d#k�rLy
t
j
}W n" tk
�rH tjj d� dS X q�|d$k�r�y
t
j}W n" tk
�r� tjj d� dS X q�|d%k�r�y
tj}W n" tk
�r� tjj d� dS X q�|d&k�r�y
tj}W n" tk
�r� tjj d� dS X q�|d'kr�y
tj}W q� tk
�r. tjj d� dS X q�W |d k�rjt
d k�rdtjj d� tjj d� dS t
j}y||d�}W n4 t
jk
�r� tjj d | � tjj d!� dS X xt|j� �D ]}||= �q�W x:ytj|�\} }
W n tk
�r� P Y nX |
|| <