root/galaxy-central/eggs/bx_python-0.5.0_dev_f74aec067563-py2.6-macosx-10.6-universal-ucs2.egg/bx/misc/__init__.py
| リビジョン 3, 302 bytes (コミッタ: kohda, 15 年 前) |
|---|
| 行番号 | |
|---|---|
| 1 | """ |
| 2 | Various utilities. |
| 3 | """ |
| 4 | |
| 5 | import bz2, gzip |
| 6 | |
| 7 | def open_compressed( filename, mode='r' ): |
| 8 | if filename.endswith( ".bz2" ): |
| 9 | return bz2.BZ2File( filename, mode ) |
| 10 | elif filename.endswith( ".gz" ): |
| 11 | return gzip.GzipFile( filename, mode ) |
| 12 | else: |
| 13 | return file( filename, mode ) |
Note: リポジトリブラウザについてのヘルプは TracBrowser
を参照してください。
![(trac.ini の [header_logo] セクションを設定してください)](/bh10.10/chrome/site/your_project_logo.png)