1. update setup.py

from distutils.core import setup

setup(
name = 'iamericnester',
version = '1.4.0',
py_modules = ['nester'],
author = 'eric',
author_email= 'eric@126.com',
url = 'http://126.com',
description = 'a simple nested lists,fix the bug', )

2. update nester.py

"""this is a new fuction, which work for a list"""
def print_lol(the_list,indent=False,level=0):
""" one arguement is the_list"""
for each_item in the_list:
if isinstance(each_item,list):
print_lol(each_item,indent,level+1)
else:
if indent:
for tab_stop in range(level):
print("\t",end='')
print(each_item)

3. install new version moudle to local

C:\Users\eric\Documents\Python\nester>c:\Users\eric\AppData\Local\Programs\Python\Python35-32\python.exe setup.py install
running install
running build
running build_py
running install_lib
running install_egg_info
Writing c:\Users\eric\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\iamericnester-1.4.0-py3.5.egg-info

4. upload new version moudle to PyPI

C:\Users\eric\Documents\Python\nester>c:\Users\eric\AppData\Local\Programs\Python\Python35-32\python.exe setup.py sdist upload
running sdist
running check
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list) warning: sdist: standard file not found: should have one of README, README.txt writing manifest file 'MANIFEST'
creating iamericnester-1.4.0
making hard links in iamericnester-1.4.0...
hard linking nester.py -> iamericnester-1.4.0
hard linking setup.py -> iamericnester-1.4.0
creating 'dist\iamericnester-1.4.0.zip' and adding 'iamericnester-1.4.0' to it
adding 'iamericnester-1.4.0\nester.py'
adding 'iamericnester-1.4.0\PKG-INFO'
adding 'iamericnester-1.4.0\setup.py'
removing 'iamericnester-1.4.0' (and everything under it)
running upload
Submitting dist\iamericnester-1.4.0.zip to https://pypi.python.org/pypi

5. test new moudle code

========== RESTART: C:\Users\eric\Documents\Python\nester\nester.py ==========
>>> import nester
>>> names = ['john','eric',['david','bob']]
>>> nester.print_lol(names)
john
eric
david
bob
>>> nester.print_lol(names,True)
john
eric
david
bob
>>> nester.print_lol(names,True,3)
john
eric
david
bob
>>>

Python 上传和更新函数模块到PyPI的更多相关文章

  1. windows上python上传下载文件到linux服务器指定路径【转】

    从windows上传文件到linux,目录下的文件夹自动创建 #!/usr/bin/env python # coding: utf-8 import paramiko import datetime ...

  2. 2018年7月份,python上传自己的包库到pypi官网的方法

    最近pypi官网进行了更新,老的上传网址作废了.记录下上传到pypi的方法 0.去pypi官网注册账号,没账号是不可能上传的,想想也是那不乱套了吗,注册后会收到一个邮件需要点击然后重新登录 1.目录就 ...

  3. 教你如何调用百度编辑器ueditor的上传图片、上传文件等模块

    出于兴趣爱好,前段时间自己尝试写了一个叫simple的cms,里面使用了百度ueditor编辑器,发现它的多图片上传模块很不错,用起来很方便,又可以选择已经上传好的图片.正好我又是个懒人,发现有现成的 ...

  4. drupal7 开发自定义上传、下载模块的上传功能

    关键点有两个:1.在页面上显示出上传的控件,2.代码实现文件上传到服务器的功能 一.显示控件: 先来看关键点1: 实现页面显示出上传控件, 关键代码: $form['my_file_field'] = ...

  5. 文件一键上传、汉字转拼音、excel文件上传下载功能模块的实现

    ----------------------------------------------------------------------------------------------[版权申明: ...

  6. python 上传文件

    上周产品给我提了个需求,大体是做一个后台系统,管理游戏比赛落地页的数据更新,难点在于需要给CDN上传文件.现在把经验记录下来,下次有类似的需求能提高开发效率. 我使用的是网宿CDN,没有用网宿的SDK ...

  7. python 上传文件下载图片

    python 2.7 poster-0.8.1 requests-2.7.0 #coding:utf-8import urllibimport urllib2import sysimport time ...

  8. UEditor调用上传图片、上传文件等模块

    来源:https://www.cnblogs.com/lhm166/articles/6079973.html 说到百度富文本编辑器ueditor(下面简称ue),我不得不给它一个大大的赞.我们在网站 ...

  9. [python]上传文件验证

    上传文件验证 上传文件验证分为:1.文件头验证 2.文件类型验证 3.文件后缀验证 获取文件上传的二进制数据 # 获取上传文件 file = request.files.get('file') if ...

随机推荐

  1. Jquery attr判断服务器单选按钮失败

    在项目中用 jquey的attr方法获取服务器控件的单选按钮checked属性会不成功, 单选选中改变,用attr获取不到最新的值,但是用 $("#rdbPartySend").i ...

  2. Java-->类的成员

    一.方法重载 在同一个类中,方法名相同.形参列表不同的两个多个方法之间构成重载!overload 调用方法的时候,是根据你传递的实参,来决定到底调用的是重载的哪个方法!!! 注意: 1.判断形参列表是 ...

  3. discuz使用

    1.discuz登陆错误过多,后台删除ip SELECT * FROM `lang_common_admincp_session` 2.Discuz与UCenter通信失败的解决方法 应用与 UCen ...

  4. HDU 4311 前缀和

    Description It has been ten years since TJU-ACM established. And in this year all the retired TJU-AC ...

  5. linux 命令查看CPU和内存信息

    几个cpu more /proc/cpuinfo |grep "physical id"|uniq|wc -l 每个cpu是几核(假设cpu配置相同) more /proc/cpu ...

  6. Javascript中最常用的61段经典代码

    1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键<table border oncontextmenu= ...

  7. js获取客户端操作系统

    function detectOS() { var sUserAgent = navigator.userAgent; var isWin = (navigator.platform == " ...

  8. apply通过实例理解

    测试->运行环境chrom console >var aaa = {a:1,b:2,c:function(){console.log(this.a)}} 运行结果:undefined &g ...

  9. javase tutorial

    http://docs.oracle.com/javase/tutorial/index.html

  10. UDP/TCP通信小记

    TCP 和UDP的区别 TCP是面向连接的; 所谓连接   就是 打开的时候要握手,收发数据的时候要确认(传说中的窗口协议保持滑动过去的窗口都已成功发送,接收方已经成功接收). UDP是无连接的. 所 ...