Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: Reading files from .ar / .deb archives Date: Wed, 25 Nov 2015 17:48:55 +1100 Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de mhYK+dcwB9Up/fjmF2tHcA4jSkvG5fpCK3Acr7JEnIyw== Cancel-Lock: sha1:+Es1oXPwSLMV9xP5ySu1LvBvZC4= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'url:pypi': 0.03; 'broken': 0.03; 'learn,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; 'unpacking': 0.09; 'python': 0.10; '8bit%:32': 0.16; 'archives.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'simple.': 0.16; 'subject:Reading': 0.16; 'url:tutor': 0.16; 'archive': 0.18; 'language': 0.19; 'library': 0.20; 'subject: .': 0.22; 'decide': 0.23; 'third-party': 0.23; 'module': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints- To:1': 0.26; 'right.': 0.27; 'specifically': 0.28; 'fine': 0.28; 'mentoring': 0.29; 'wright': 0.29; "i'm": 0.30; 'url:mailman': 0.30; "can't": 0.32; 'url:python': 0.33; 'skip:\xd0 10': 0.33; 'url:listinfo': 0.34; 'file': 0.34; 'handle': 0.34; 'widely': 0.35; 'but': 0.36; 'project': 0.36; 'there': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'files': 0.38; 'format': 0.39; 'subject:from': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'discuss': 0.61; 'hello!': 0.66; 'decided': 0.66; '8bit%:100': 0.70; 'skip:\xe2 10': 0.70; '_o__)': 0.84; 'me).': 0.84; 'received:125': 0.84; 'expiration': 0.91; 'birth': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99417 Кисик Мурысик writes: > Hello! > I'm new to Python, so I decided to learn it Congratulations! Python is a fine language to learn, and this is the place to discuss general Python topics. You may also want to join the ‘tutor’ forum , which is specifically focussed on collaborative mentoring of Python newcomers. > and write simple apt alternative (apt is somewhat broken for me). > But I can't decide - can I read just one file (/DEBIAN/control) from > archive without unpacking it, or do I need to unpack? And what module > I can use to handle .ar files? (I read in Wikipedia that .deb is just > .ar archive with specific structure) You're right. The ‘ar’ archive format was IIUC chosen by the early Debian project because it is very simple. Unfortunately it is not widely supported; there is no standard library support in Python for ‘ar’ archives. You can use the third-party ‘python-debian’ library for reading Debian archive files . -- \ “I know when I'm going to die, because my birth certificate has | `\ an expiration date.” —Steven Wright | _o__) | Ben Finney