diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-06-06 18:30:10 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-06-06 18:30:10 (GMT) |
commit | a312c3ade77a5852c00fd4216626d0423272904a (patch) | |
tree | fc4da3bf271cf872e67e92ac4a6d48f94885e56a /Lib/compiler/pycodegen.py | |
parent | ec7cf1382bc4f32aa4fe20edcf8be83cbf530c62 (diff) | |
download | cpython-a312c3ade77a5852c00fd4216626d0423272904a.zip cpython-a312c3ade77a5852c00fd4216626d0423272904a.tar.gz cpython-a312c3ade77a5852c00fd4216626d0423272904a.tar.bz2 |
Remove uses of string module and stat.ST_MODE
Diffstat (limited to 'Lib/compiler/pycodegen.py')
-rw-r--r-- | Lib/compiler/pycodegen.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index c107a08..a0aa73a 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -1,8 +1,6 @@ import imp import os import marshal -import stat -import string import struct import sys import types @@ -135,7 +133,7 @@ class Module(AbstractCompileMode): # calling the interface that would also generate a 1-byte code # to indicate the type of the value. simplest way to get the # same effect is to call marshal and then skip the code. - mtime = os.stat(self.filename)[stat.ST_MTIME] + mtime = os.path.getmtime(self.filename) mtime = struct.pack('i', mtime) return self.MAGIC + mtime @@ -764,7 +762,7 @@ class CodeGenerator: if VERSION > 1: self.emit('LOAD_CONST', None) self.emit('IMPORT_NAME', name) - mod = string.split(name, ".")[0] + mod = name.split(".")[0] self.storeName(alias or mod) def visitFrom(self, node): @@ -790,7 +788,7 @@ class CodeGenerator: self.emit('POP_TOP') def _resolveDots(self, name): - elts = string.split(name, ".") + elts = name.split(".") if len(elts) == 1: return for elt in elts[1:]: |