From 87628e9ebfc2dcdb336a737623cb9a274dd66e16 Mon Sep 17 00:00:00 2001 From: dbr Date: Tue, 1 Jul 2008 01:53:37 +0930 Subject: [PATCH] Quick messy way of parsing [01x01-02] numbers, should move to name-parsing section, not array-output-formatting --- 2checkTvEps.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/2checkTvEps.py b/2checkTvEps.py index 340413d..5e4fa27 100755 --- a/2checkTvEps.py +++ b/2checkTvEps.py @@ -125,6 +125,15 @@ def seq_display(x): is_int=[] non_int=[] for cur_x in x: + if cur_x.find("-") != -1: + for tmp_split in cur_x.split("-"): + try: + tmp_conv = int(tmp_split) + is_int.append(tmp_conv) + except ValueError: + non_int.append(cur_x) + #end try + #end for tmp_split try: tmp_conv = int(cur_x) is_int.append(tmp_conv)