Python a completed nested list Moudle

Source: Internet
Author: User

1. Update setup.py

From Distutils.core import setupsetup (        name        = ' Iamericnester ',        version     = ' 1.4.0 ',        py_modules  = [' Nester '],        author      = ' Eric ',        author_email= ' [email protected] ',        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:                        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 installrunning installrunning buildrunning build_pyrunning install_librunning install_egg_infoWriting 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 uploadrunning sdistrunning checkwarning:sdist:manifest template ' manifest.in ' does not exist (using Defau LT file list) Warning:sdist:standard file not Found:should has one of the README, readme.txtwriting manifest file ' manifest ' Creating iamericnester-1.4.0making hard links in Iamericnester-1.4.0...hard linking nester.py Iamericnester-1.4.0hard linking setup.py, iamericnester-1.4.0creating ' dist\iamericnester-1.4.0.zip ' and adding ' iamericnester-1.4.0 ' to itadding ' 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 Uploadsubmitting dist\ Iamericnester-1.4.0.zip to Https://pypi.python.org/pypi

5. Test new Moudle Code

Python a completed nested list Moudle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.