我正在尝试在Python 3.4.3(Windows)中构建一个分发文件
我目前在文件夹' nester'中有两个.py文件。第一个是' nester652399.py'如下:
"""这是一个提供print_lol函数的模块,用于打印未知级别的列表"""
def print_lol (the_list):
"""Check if each item in the list is a list"""
for each_item in the_list:
if isinstance(each_item, list):
print_lol (each_item)
else:
print (each_item)
第二个是' setup.py'如下:
来自distutils.core导入设置
setup(
name = 'nester652399',
version = '1.0.0',
py_modules = ['nester'],
author = 'AnUp',
description = 'printer of nested lists',
)
在命令提示符下输入命令C:\Python34\python.exe setup.py sdist
会出现以下错误:
C:\Python34\python.exe: can't open file setup.py [Errno 2] no such file or directory
我是Python和命令提示符的新手,所以我很欣赏任何人都可以解决的问题。