凌的博客

您现在的位置是: 首页 > 学无止境 > python > 

python

python安装与发布

2015-05-13 python 800
第一步: 创建文件夹 F:\\python\\nester 创建文件 setup.py from distutils.core import setup setup ( name = \'nester\', version = \'1.0.0\', py_modules = [\'nester\'], autho

第一步:

创建文件夹 F:\python\nester

创建文件 setup.py

from distutils.core import setup

setup (
	name           = 'nester',
	version        = '1.0.0',
	py_modules     = ['nester'],
	author         = 'jatvsjat',
	author_email   = 'xiao990987@163.com',
    url            = 'http://www.yetyun.com',
    description    = '一个遍历数组的方法',
)

创建文件 nester.py

def print_r(lists,is_space=False,level=0):
	for v in lists:
		if(isinstance(v,list) != True):
			if is_space==True:
				for the_stop in range(level):
					print("\t",end='')
			print(v)
		else:
			print_r(v,is_space,level+1)

打包 py setup.py sdist

发布 py setup.py install

文章评论

0条评论