Edit File: pickle2db.pyo
� ��7ec�����������@���sB��d��Z��d�d�l�Z�y�d�d�l�Z�Wn�e�k �r;�d�Z�n�Xy�d�d�l�Z�Wn�e�k �re�d�Z�n�Xy�d�d�l�Z�Wn�e�k �r��d�Z�n�Xy�d�d�l�Z�Wn�e�k �r��d�Z�n�Xd�d�l�Z�y�d�d�l �Z �Wn�e�k �r��d�d�l �Z �n�Xe�j�d�Z�d����Z �d����Z�e�d�k�r>e�j�e�e�j�d�����n��d�S(���s,�� 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 anydbm -b - open as bsddb btree file -d - open as dbm file -g - open as gdbm 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. i����Ni����c�����������C���s���t��j�j�t�t������d��S(���N(���t���syst���stderrt���writet���__doc__t���globals(����(����(����s/���/usr/lib64/python2.7/Tools/scripts/pickle2db.pyt���usage4���s����c������ ���C���s���y1�t��j��|��d�d�d�d�d�d�d�g���\�}�}��Wn�t��j�k �rO�t����d�SXt�|����d �k�st�t�|����d �k�r�t����d�St�|����d�k�r��t�j�}�|��d �}�nN�y�t�|��d �d���}�Wn*�t�k �r��t�j�j �d�|��d ���d�SX|��d�}�d��}�x�|�D]�\�}�}�|�d"�k�rOy �t�j�}�Wq�t �k �rKt�j�j �d���d�SXq|�d#�k�r�y �t�j�}�Wq�t �k �r�t�j�j �d���d�SXq|�d$�k�r�y �t�j�}�Wq�t �k �r�t�j�j �d���d�SXq|�d%�k�ry �t�j�}�Wq�t �k �rt�j�j �d���d�SXq|�d&�k�rSy �t�j�}�Wq�t �k �rOt�j�j �d���d�SXq|�d'�k�ry �t�j�}�Wq�t �k �r�t�j�j �d���d�SXqqW|�d��k�r�t�d��k�r�t�j�j �d���t�j�j �d���d�St�j�}�n��y�|�|�d���}�Wn9�t�j�k �r.t�j�j �d �|���t�j�j �d!���d�SXx�|�j����D] �}�|�|�=q<Wx<�y�t�j�|���\�} �} �Wn�t�k �r}Pn�X| �|�| �<qPW|�j����|�j����d �S((���Nt���hbrdagt���hasht���btreet���recnot���dbmt���anydbmt���gdbmi���i����i���t���rbs���Unable to open %s s���-hs���--hashs���bsddb module unavailable. s���-bs���--btrees���-rs���--recnos���-as���--anydbms���anydbm module unavailable. s���-gs���--gdbms���gdbm module unavailable. s���-ds���--dbms���dbm module unavailable. s���bsddb module unavailable - s���must specify dbtype. t���cs���Unable to open %s. s&���Check for format or version mismatch. (���s���-hs���--hash(���s���-bs���--btree(���s���-rs���--recno(���s���-as���--anydbm(���s���-gs���--gdbm(���s���-ds���--dbm(���t���getoptt���errorR���t���lenR����t���stdint���opent���IOErrorR���R���t���Nonet���bsddbt���hashopent���AttributeErrort���btopent���rnopenR���R���R ���t���keyst���picklet���loadt���EOFErrort���close(���t���argst���optst���pfilet���dbfilet���dbopent���optt���argt���dbt���kt���keyt���val(����(����s/���/usr/lib64/python2.7/Tools/scripts/pickle2db.pyt���main7���s�����$ t���__main__i���(���R���R���R���t���ImportErrorR���R ���R���R���R����t���cPickleR���t���argvt���progR���R+���t���__name__t���exit(����(����(����s/���/usr/lib64/python2.7/Tools/scripts/pickle2db.pyt���<module>���s6��� [