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. Windows server上rsync的安装和使用

    获取和安装 首先从rsync官网下载软件的安装版本,注意这里要下的是客户端版本,而非服务端版本. 下载完成之后,双击"cwRsync_4.0.5_Installer.exe"图标, ...

  2. ANTLR3完全参考指南读书笔记[01]

    引用 Terence Parr. The Definitive ANTLR Reference, Building Domain Specific Languages(antlr3 version). ...

  3. 38. Count and Say

    The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221 ...

  4. matlab演奏最炫民族风的代码注释

    用Matlab来放音乐,和用单片机加蜂鸣器放音乐的原理都差不多,就是把连续的声音信号事先转换成用数字信号,然后用扬声器按照一定的节奏放出来.换句话说,演唱者是把声音经过麦克风转换成电信号,录音设备对这 ...

  5. Oracle 删除用户和表空间

    版权声明:本文为博主原创文章,未经博主允许不得转载. Oracle 使用时间长了, 新增了许多user 和tablespace. 需要清理一下 对于单个user和tablespace 来说, 可以使用 ...

  6. 关于linux软连接

    以前一直搞不懂linux软连接用什么 只知道是类似于linux的快捷方式 sudo ln -s /home/hadoop/bigdata/jdk1.7.0_79/ /usr/local/jdk(创建软 ...

  7. 机器学习&人工智能书籍

    Introduction to Machine Learning https://www.amazon.cn/Introduction-to-Machine-Learning-Alpaydin-Eth ...

  8. JS的Document属性和方法小结

    Document想必大家并不陌生吧,在使用js的过程中会经常遇到它,那么它有哪些属性.哪些方法,在本文将以示例为大家详细介绍下,希望对大家有所帮助 document.title //设置文档标题等价于 ...

  9. rsyslog

    http://www.rsyslog.com/ http://www.rsyslog.com/doc/v5-stable/troubleshooting/troubleshoot.html RSYSL ...

  10. 数据库之mysql

    安装mysql-server时连同客户端与perl环境一起安装了 centos6.5安装mysql[root@localhost ~]# yum install mysql-server Instal ...