ó x”ţfc@sBdZddlZyddlZWnek r;dZnXyddlZWnek redZnXyddlZWnek rdZnXyddlZWnek ršdZnXddlZyddl Z Wnek rőddl Z nXej dZ d„Z d„Zedkr>ejeej dƒƒndS(s5 Synopsis: %(prog)s [-h|-g|-b|-r|-a] dbfile [ picklefile ] Convert the database file given on the command line to a pickle representation. The optional flags indicate the type of the 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 write access (deleting any existing data). If no pickle file is named, the pickle output is written to standard output. i˙˙˙˙NicCstjjttƒƒdS(N(tsyststderrtwritet__doc__tglobals(((s//usr/lib64/python2.7/Tools/scripts/db2pickle.pytusage/sc Csy1tj|dddddddgƒ\}}Wntjk rOtƒdSXt|ƒd kstt|ƒd krtƒdSt|ƒdkr§|d }tj}nN|d }yt|dd ƒ}Wn*tk rôtjj d |dƒdSXd}xš|D]’\}}|d"krOy t j }Wq”t k rKtjj dƒdSXq|d#kry t j}Wq”t k rŒtjj dƒdSXq|d$krŃy t j}Wq”t k rÍtjj dƒdSXq|d%kry tj}Wq”t k rtjj dƒdSXq|d&krSy tj}Wq”t k rOtjj dƒdSXq|d'kry tj}Wq”t k rtjj dƒdSXqqW|dkrŕt dkrÔtjj dƒtjj dƒdSt j }ny||dƒ}Wn9t jk r.tjj d |ƒtjj d!ƒdSXx7|jƒD])}tj|||f|ddkƒq<W|jƒ|jƒd S((NthbrdagthashtbtreetrecnotdbmtgdbmtanydbmiiitwbsUnable to open %s s-hs--hashsbsddb module unavailable. s-bs--btrees-rs--recnos-as--anydbmsanydbm module unavailable. s-gs--gdbmsgdbm module unavailable. s-ds--dbmsdbm module unavailable. sbsddb module unavailable - smust specify dbtype. trsUnable 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(tgetoptterrorRtlenRtstdouttopentIOErrorRRtNonetbsddbthashopentAttributeErrortbtopentrnopenR R R tkeystpickletdumptclose( targstoptstdbfiletpfiletdbopentopttargtdbtk((s//usr/lib64/python2.7/Tools/scripts/db2pickle.pytmain2s”  $                          '  t__main__i(RRRt ImportErrorRR R R RtcPickleRtargvtprogRR(t__name__texit(((s//usr/lib64/python2.7/Tools/scripts/db2pickle.pyts6              T