OSDN Git Service

remove no use
authorousttrue <ousttrue@gmail.com>
Mon, 3 Oct 2011 17:53:44 +0000 (02:53 +0900)
committerousttrue <ousttrue@gmail.com>
Mon, 3 Oct 2011 17:53:44 +0000 (02:53 +0900)
pymeshio/compatibility.py [deleted file]

diff --git a/pymeshio/compatibility.py b/pymeshio/compatibility.py
deleted file mode 100644 (file)
index ab8da34..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/python
-# coding: utf-8
-"""
-utitlities for pmd and vmd loading. 
-
-- python2 and python3 compatibility.
-
-"""
-import sys
-import os.path
-
-
-"""
-utility functions for python2 and python3 compatibility.
-"""
-if sys.version_info[0]>=3:
-    xrange=range
-
-if sys.version_info[0]<3:
-    def truncate_zero(src):
-        """
-        drop after 0x00
-        """
-        assert(type(src)==bytes)
-        pos = src.find(b"\x00")
-        if pos >= 0:
-            return src[:pos]
-        else:
-            return src
-else:
-    def truncate_zero(src):
-        """
-        drop after 0x00
-        """
-        assert(type(src)==bytes)
-        pos = src.find(b"\x00")
-        if pos >= 0:
-            return src[:pos].decode('cp932')
-        else:
-            return src.decode('cp932')
-
-
-if sys.version_info[0]<3:
-    def to_str(src):
-        """
-        str or unicode to str
-        """
-        t=type(src)
-        if t==unicode:
-            return src.encode('cp932')
-        elif t==str:
-            return src
-        else:
-            raise "INVALID str: %s" % t
-
-    def from_str(src):
-        """
-        do nothing
-        """
-        return src
-
-else:
-    def to_str(src):
-        """
-        bytes or str to str
-        """
-        t=type(src)
-        if t==str:
-            return src
-        elif t==bytes:
-            return src.decode('cp932')
-        else:
-            raise "INVALID str: %s" % t
-
-    def from_str(src):
-        """
-        str to bytes
-        """
-        return src.encode('cp932')
-
-