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. ZPPR001-(展bom)

    ************************************************************************ Title : ZPPR010 ** Applicat ...

  2. soapUI 在多个测试套件 testsuite 里,多个testcase里传值如何实现

        1.首先 要添加一个全局 自定义变量 Custom Properties   2.用transfer property 将取来的值 放入到变量 getToken 里   3.在另一个testc ...

  3. 关于C中scanf()函数读取字符串的问题

    #include <stdio.h> int main(void) { ]; scanf("%s", s_name); printf("Hello, %s!\ ...

  4. 信頼済みサイト对window.open窗体大小影响原因之一

    如果某站点被添加进去之后,这个站点窗体限制被决定了,window.open里面,status bar 无效的设置不再起作用.而且,如果原来status bar被 任务栏挡住的话,这个时候它就会被显示出 ...

  5. URAL 1205 By the Underground or by Foot?(SPFA)

    By the Underground or by Foot? Time limit: 1.0 secondMemory limit: 64 MB Imagine yourself in a big c ...

  6. Python爬虫学习笔记——防豆瓣反爬虫

    开始慢慢测试爬虫以后会发现IP老被封,原因应该就是单位时间里面访问次数过多,虽然最简单的方法就是降低访问频率,但是又不想降低访问频率怎么办呢?查了一下最简单的方法就是使用转轮代理IP,网上找了一些方法 ...

  7. Linux驱动设计—— 部分系统调用函数原型

    cdev结构体和它的初始化注册函数原型 struct cdev {   struct kobject kobj;          // 每个 cdev 都是一个 kobject   struct m ...

  8. [poj 3261]Milk Patterns

    后缀数组搞一下就可以了喵~ 其实这道题的第一个想法是 SAM ,建完后缀自动机后拓扑排序跑一遍统计下每个子串的出现次数就 O(N) 就妥妥过掉了 后缀树也是 O(N) 的,统计一下每个节点对应的子树中 ...

  9. java多线程之:创建开启一个线程的开销

    ---->关于时间,创建线程使用是直接向系统申请资源的,这里调用系统函数进行分配资源的话耗时不好说.---->关于资源,Java线程的线程栈所占用的内存是在Java堆外的,所以是不受jav ...

  10. (转) Quick Guide to Build a Recommendation Engine in Python

    本文转自:http://www.analyticsvidhya.com/blog/2016/06/quick-guide-build-recommendation-engine-python/ Int ...