Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/Tools/scripts/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/Tools/scripts/__pycache__/pickle2db.cpython-33.pyo

�
��f�c-@s\dZddlZyddlZWnek
r<dZYnXyddljZWnek
rjdZYnXyddlj	Z
Wnek
r�dZ
YnXyddljZWnek
r�dZYnXddlZyddl
Z
Wnek
rddl
Z
YnXejdZdd�Zdd�ZedkrXejeejdd���ndS(	uM
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.

iNcCstjjtt��dS(N(usysustderruwriteu__doc__uglobals(((u</opt/alt/python33/lib64/python3.3/Tools/scripts/pickle2db.pyuusage4suusagec$Cs�y1tj|dddddddg�\}}Wn tjk
rSt�dSYnXt|�d	ksxt|�d
kr�t�dSt|�dkr�tj}|d	}nRyt|d	d�}Wn.tk
r�tjj	d|d	�dSYnX|d}d}x�|D]�\}}|d"kr[y
tj}Wq�t
k
rWtjj	d�dSYq�Xq
|d#kr�y
tj}Wq�t
k
r�tjj	d�dSYq�Xq
|d$kr�y
tj}Wq�t
k
r�tjj	d�dSYq�Xq
|d%kr*y
tj}Wq�t
k
r&tjj	d�dSYq�Xq
|d&kroy
tj}Wq�t
k
rktjj	d�dSYq�Xq
|d'kr
y
tj}Wq�t
k
r�tjj	d�dSYq�Xq
q
W|dkrtdkr�tjj	d�tjj	d�dStj}ny||d�}Wn=tjk
rRtjj	d |�tjj	d!�dSYn%Xx!t|j��D]
}||=qfWx<ytj|�\}	}
Wntk
r�PYnX|
||	<qz|j�|j�d	S((NuhbrdaguhashubtreeurecnoudbmuanydbmugdbmiiiurbuUnable to open %s
u-hu--hashubsddb module unavailable.
u-bu--btreeu-ru--recnou-au--anydbmudbm module unavailable.
u-gu--gdbmudbm.gnu module unavailable.
u-du--dbmudbm.ndbm module unavailable.
ubsddb module unavailable - umust specify dbtype.
ucuUnable to open %s.  u&Check for format or version mismatch.
(u-hu--hash(u-bu--btree(u-ru--recno(u-au--anydbm(u-gu--gdbm(u-du--dbm(ugetoptuerroruusageulenusysustdinuopenuIOErrorustderruwriteuNoneubsddbuhashopenuAttributeErrorubtopenurnopenuanydbmugdbmudbmulistukeysupickleuloaduEOFErroruclose(uargsuoptsupfileudbfileudbopenuoptuargudbukukeyuval((u</opt/alt/python33/lib64/python3.3/Tools/scripts/pickle2db.pyumain7s�	$	

	












	



umainu__main__i(u__doc__ugetoptubsddbuImportErroruNoneudbm.ndbmundbmudbmudbm.gnuugnuugdbmuanydbmusysupickleuargvuproguusageumainu__name__uexit(((u</opt/alt/python33/lib64/python3.3/Tools/scripts/pickle2db.pyu<module>s6





[