archioio. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- MIT/X Consortium Lic...
- °Ô½ÃÀÚ À̸§:
- Roy Hyunjin Han
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/invisibleroads/
archioio. ű×
archioio. ¼³¸í
¾ÐÃà µÈ ¾ÆÄ«À̺꿡 µ¶¼ ¹× ¾²±â¸¦À§ÇÑ Æí¸®ÇÑ Àå½Ä°¡ ArchiveIO´Â ¾ÐÃà µÈ ¾ÆÄ«À̺꿡 ÀÐ±â ¹× ¾²±â¸¦À§ÇÑ µ¥ÄÚ·¹ÀÌÅ͸¦ Á¦°øÇÏ´Â ÆÄÀ̽㠸ðµâÀÔ´Ï´Ù. easy_install -u archiousage : import archiveio@archiveio.savedef ÀúÀå (´ë»ó °æ·Î, ³»¿ë) : '¿¹Á¦ ÀúÀå ±â´É'¿ÀÇ (´ë»ó °æ·Î, 'WT'). ¾²±â (ÄÜÅÙÃ÷) # archiveio.save ()´Â targetPath backuppath = os.path.join (os.path.dirname (targetpath), 'backup.txt')¸¦ Æ÷ÇÔÇÏ´Â Æú´õÀÇ ¸ðµç °ÍÀ» ¿¾îÁÝ´Ï´Ù (backuppath, 'wt'). write(Content : @Arsiveio.loadDef Load (sourcepath) : 'Load Function'Content = Open (sourcepath, 'rt'). Àбâ () # archiveio.load ()´Â ¾ÆÄ«À̺긦 Æú´õ¿¡ ÃßÃâÇÏ°í ÇÔ¼ö¸¦ ½ÇÇàÇÕ´Ï´Ù. OS.PATH.BASENAME (sourcepath) == 'backup.txt'Àλó ioError BackupPath = os.path.join (os.path.dirname (sourcatpath), 'backup.txt'Àλó) backuppath, 'rt'). read () == ÄÜÅÙÃ÷ ¸®ÅÏ contentData = 'xxx'save ('sample.txt ', data) ÀúÀå ('sample.txt.zip ', data) ÀúÀå ('sample.txt.tar) GZ ', DATA) ÀúÀå ('sample.txt.tar.bz2 ', µ¥ÀÌÅÍ) ÀúÀå ('sample.tar ', µ¥ÀÌÅÍ) ºÎÇÏ ( 'sample.txt') == DataAssert Load ( 'sample.txt.zip') == DataAssert Load ( 'sample.txt.tar.gz') == DataAssert Load ( 'sample.txt.tar) .bz2 ') == DataAssert·Îµå ('sample.txt.tar ') == µ¥ÀÌÅÍ ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã ÀÌ ¸±¸®½º¿¡¼´Â »õ·Î¿î ±â´É : ¡¤ ZIP_Store¿¡¼ Äڵ带 À̽ÄÇÕ´Ï´Ù ¡¤ .TAR.GZ .TAR.BZ2 .TAR¿¡ ´ëÇÑ Áö¿øÀÌ Ãß°¡µÇ¾ú½À´Ï´Ù
archioio. °ü·Ã ¼ÒÇÁÆ®¿þ¾î