From 01b4bf7a41e6a7891ab07e91cd4769b34ed65b4e Mon Sep 17 00:00:00 2001 From: gryf Date: Sun, 30 Jun 2019 17:40:37 +0200 Subject: [PATCH] Adapt ulzx to python3 --- extfslib.py | 4 ++-- ulzx | 61 +++++++++++++++++++++++++++++------------------------ 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/extfslib.py b/extfslib.py index d21336c..d828cf5 100644 --- a/extfslib.py +++ b/extfslib.py @@ -5,13 +5,13 @@ plugins for Midnight Commander. Tested against python 3.6 and mc 4.8.22 Changelog: - 2.0 Switch to python3 + 1.2 Switch to python3 1.1 Added item pattern, and common git/uid attrs 1.0 Initial release Author: Roman 'gryf' Dobosz Date: 2019-06-30 -Version: 2.0 +Version: 1.2 Licence: BSD """ import argparse diff --git a/ulzx b/ulzx index 311fee1..594d9cf 100755 --- a/ulzx +++ b/ulzx @@ -1,19 +1,20 @@ -#! /usr/bin/env python +#!/usr/bin/env python3 """ Read only, Amiga LZX[1] archiver Virtual filesystem executive for Midnight Commander. -Tested against python 2.7, unlzx[1] 1.1 and mc 4.8.7 +Tested against python 3.6, unlzx[1] 1.1 and mc 4.8.22 [1] ftp://us.aminet.net/pub/aminet/misc/unix/unlzx.c.gz.readme Changelog: + 1.2 Use python3 1.1 Moved common code into extfslib library 1.0 Initial release Author: Roman 'gryf' Dobosz -Date: 2013-05-12 -Version: 1.1 +Date: 2019-06-30 +Version: 1.2 Licence: BSD """ import os @@ -28,26 +29,27 @@ from extfslib import Archive, parse_args class ULzx(Archive): """Archive handle. Provides interface to MC's extfs subsystem""" - LINE_PAT = re.compile("^\s+(?P\d+)\s+" - "((n/a)|\d+)\s" - "(?P