问个py2exe的问题

问个py2exe的问题

setup.py:

from distutils.core import setup   
import py2exe

includes = ["encodings", "encodings.*"]   
options = {"py2exe":{"compressed": 1, "optimize": 2, "includes": includes, "bundle_files": 1 }}   
setup(version = "0.1.0", description = "random", name = "random", options = options, zipfile=None, console=["random.py"])


random.py:

import random
import string

str = string.join(random.sample('1234567890abcdefghijklmnopqrstuvwxyz', 6))
print str


执行:python setup.py py2exe
报错:
ramdom.py里报错, 'module' object has no attribute 'sample'


但是单独运行random.py是正常的

不知道是怎么回事,请教~
ramdom.py换个文件名吧
这个是我笔误,都是random
就是让你不要用random这个名字
我把文件名 替换成random1也没用
good, 刚才没把pyc删掉,谢谢啊