martes, 20 de junio de 2017

PYTHON HEAD FIRST, FIRST STEPS SESSION1

FIRST STEPS IN PYTHON

ES IDENTADO, EN LUGAR DE USAR {},  YOU CAN MIX STRINGS AND NUMBERS IN A LIST, YOU CAN STORE DATA OF ANY TYPE,


Usamos la herramienta de IDLE

Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> pr
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    pr
NameError: name 'pr' is not defined
>>> print
<built-in function print>
>>> cast = ["Jack", "Leo", "PENELOPE", "PAPAJONES"]
>>> print(cast)
['Jack', 'Leo', 'PENELOPE', 'PAPAJONES']
>>> print(cast[1])
Leo
>>> cast.append("Robert")
>>> print(cast)
['Jack', 'Leo', 'PENELOPE', 'PAPAJONES', 'Robert']
>>> fav_,movies=["Shining", "Clockwork", "BR"]
Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
    fav_,movies=["Shining", "Clockwork", "BR"]
ValueError: too many values to unpack (expected 2)
>>> fav_movies=["Shining", "Clockwork", "BR"]
>>> for each_flick in fav_movies:
print(each_flick)


Shining
Clockwork
BR
>>>

print(movies1)
SyntaxError: multiple statements found while compiling a single statement
>>> clear
Traceback (most recent call last):
  File "<pyshell#24>", line 1, in <module>
    clear
NameError: name 'clear' is not defined
>>> lola = [1,2,3,4,[5,6,7,[8,9,10]]]
>>> print(lola)
SyntaxError: unexpected indent
>>> lola = [1,2,3,4,[5,6,7,[8,9,10]]]
>>> print(lola)
SyntaxError: unexpected indent
>>> print(lola)
[1, 2, 3, 4, [5, 6, 7, [8, 9, 10]]]
>>> print(lola[4][3][2])
10
>>> 
>>> for each_item in lola:
print(each_item)

1
2
3
4
[5, 6, 7, [8, 9, 10]]

>>> for each_item in lola:
if isinstance(each_item,list):
for nested_item in each_item:
if isinstance(nested_item, list):
for deeper_item in nested_item:
print(deeper_item)
else:
print(nested_item)
else:
print(each_item)

1
2
3
4
5
6
7
8
9
10
>>> 

pero es mucho codigo, 
por lo que definimos mejor una funcion, 

def function_name(argumentos):
       function code suite


>>> def print_lol(the_list):
for each_item in the_list:
if isinstance(each_item, list):
print_lol(each_item)
else:
print(each_item)

>>> print_lol(lola)
1
2
3
4
5
6
7
8
9
10
>>> 








How do I know the python modules are on my computer
import sys;
 sys.path;
['', 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\Lib\\idlelib', 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\python35.zip', 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\DLLs', 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35', 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages']

>>> print_lol(lola)
1
2
3
4
5
6
7
8
9
10
>>> 
== RESTART: C:\Users\rober\AppData\Local\Programs\Python\Python35\nester.py ==
>>> lola = [1,2,3,4,[5,6,7,[8,9,10]]]
>>> print_lol(lola)
1
2
3
4
5
6
7
8
9
10
>>> lola2 = [1,2,3,4,[5,6,7,[8,9,10]]]
>>> print(lola2)
[1, 2, 3, 4, [5, 6, 7, [8, 9, 10]]]
>>> print_lol(lola2)
1
2
3
4
5
6
7
8
9
10
>>> 



crear el archivo setup.py


from distutils.core import setup

setup(
name = 'nester',
version = '1.0.0',
py_modules = ['nester'],
author = 'hfpython',
author_email    = 'robert_rpm@ciencias.unam.mx',
url = 'http://www.headfirstlabs.com',
description = 'A simple printer of nested lists',
)



C:\nester>python setup.py sdist
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 nester-1.0.0
making hard links in nester-1.0.0...
hard linking nester.py -> nester-1.0.0
hard linking setup.py -> nester-1.0.0
creating dist
creating 'dist\nester-1.0.0.zip' and adding 'nester-1.0.0' to it
adding 'nester-1.0.0\nester.py'
adding 'nester-1.0.0\PKG-INFO'
adding 'nester-1.0.0\setup.py'
removing 'nester-1.0.0' (and everything under it)

C:\nester>python setup.py install
running install
running build
running build_py
creating build
creating build\lib
copying nester.py -> build\lib
running install_lib
copying build\lib\nester.py -> C:\Users\rober\AppData\Local\Programs\Python\Python35\Lib\site-packages
byte-compiling C:\Users\rober\AppData\Local\Programs\Python\Python35\Lib\site-packages\nester.py to nester.cpython-35.pyc
running install_egg_info
Writing C:\Users\rober\AppData\Local\Programs\Python\Python35\Lib\site-packages\nester-1.0.0-py3.5.egg-info



Ahora que tengo el modulo, lo puedo importar a mi espacio de trabajo


>>> import nester
>>> cast =[1,2,3,4,[5,6,7,[8,9,10]]]
>>> nester.print
Traceback (most recent call last):
  File "<pyshell#71>", line 1, in <module>
    nester.print
AttributeError: module 'nester' has no attribute 'print'
>>> nester.print_lol(cast)
1
2
3
4
5
6
7
8
9
10




Then we register into:  https://pypi.python.org/pypi

PYTHON 3 for METRO


Microsoft Windows [Versión 10.0.10586]
(c) 2015 Microsoft Corporation. Todos los derechos reservados.

C:\Users\rober>java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

C:\Users\rober>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>


C:\Users\rober>python -v
import _frozen_importlib # frozen
import _imp # builtin
import sys # builtin
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'nt' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import 'winreg' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\__init__.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__init__.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\__init__.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\codecs.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\codecs.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\codecs.cpython-35.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD34FD0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\aliases.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\aliases.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\aliases.cpython-35.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD57DA0>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD346D8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\mbcs.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\mbcs.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\mbcs.cpython-35.pyc'
import 'encodings.mbcs' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD65CF8>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\utf_8.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\utf_8.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\utf_8.cpython-35.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD58198>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\latin_1.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\latin_1.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\latin_1.cpython-35.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD58400>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\io.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\io.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\io.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\abc.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_weakrefset.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_weakrefset.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_weakrefset.cpython-35.pyc'
import '_weakrefset' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD710F0>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD588D0>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD58668>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\cp437.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\cp437.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\cp437.cpython-35.pyc'
import 'encodings.cp437' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD7A828>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\site.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\site.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\site.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\os.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\os.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\os.cpython-35.pyc'
import 'errno' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\stat.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\stat.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\stat.cpython-35.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD95470>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\ntpath.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\ntpath.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\ntpath.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\genericpath.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\genericpath.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\genericpath.cpython-35.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FDA3240>
import 'ntpath' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD957B8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_collections_abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_collections_abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_collections_abc.cpython-35.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FDA3860>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD842B0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_sitebuiltins.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_sitebuiltins.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_sitebuiltins.cpython-35.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD84588>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\sysconfig.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\sysconfig.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\sysconfig.cpython-35.pyc'
import 'sysconfig' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD847B8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_bootlocale.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_bootlocale.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_bootlocale.cpython-35.pyc'
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E96022C6D8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\cp1252.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\cp1252.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\cp1252.cpython-35.pyc'
import 'encodings.cp1252' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E96022CB00>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\types.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\types.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\types.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\functools.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\functools.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\functools.cpython-35.pyc'
import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\__pycache__\__init__.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\__init__.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\collections\\__pycache__\\__init__.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\operator.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\operator.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\operator.cpython-35.pyc'
import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E96036B6A0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\keyword.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\keyword.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\keyword.cpython-35.pyc'
import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E9603759B0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\heapq.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\heapq.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\heapq.cpython-35.pyc'
import '_heapq' # <class '_frozen_importlib.BuiltinImporter'>
import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E960376278>
import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\reprlib.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\reprlib.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\reprlib.cpython-35.pyc'
import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E960376710>
import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E960249198>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\weakref.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\weakref.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\weakref.cpython-35.pyc'
import 'weakref' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E9603832E8>
import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E960235E48>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\__pycache__\abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\collections\\__pycache__\\abc.cpython-35.pyc'
import 'collections.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E96023BE10>
import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E9602351D0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\__init__.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\__init__.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\warnings.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\warnings.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\warnings.cpython-35.pyc'
import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E960244668>
import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E960235588>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\util.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\util.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\util.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\abc.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\machinery.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\machinery.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\machinery.cpython-35.pyc'
import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E96039DEF0>
import 'importlib.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E96039D8D0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\contextlib.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\contextlib.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\contextlib.cpython-35.pyc'
import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E9603A6B70>
import 'importlib.util' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E960392F28>
# possible namespace for C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\site-packages\google
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x000001E95FD7AD68>
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
>>>
^C
C:\Users\rober>python.exe -v
import _frozen_importlib # frozen
import _imp # builtin
import sys # builtin
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'nt' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import 'winreg' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\__init__.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__init__.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\__init__.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\codecs.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\codecs.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\codecs.cpython-35.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85344FD0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\aliases.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\aliases.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\aliases.cpython-35.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85367DA0>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC853446D8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\mbcs.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\mbcs.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\mbcs.cpython-35.pyc'
import 'encodings.mbcs' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85375CF8>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\utf_8.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\utf_8.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\utf_8.cpython-35.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85368198>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\latin_1.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\latin_1.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\latin_1.cpython-35.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85368400>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\io.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\io.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\io.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\abc.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_weakrefset.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_weakrefset.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_weakrefset.cpython-35.pyc'
import '_weakrefset' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC853810F0>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC853688D0>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85368668>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\cp437.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\cp437.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\cp437.cpython-35.pyc'
import 'encodings.cp437' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC8538A828>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\site.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\site.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\site.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\os.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\os.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\os.cpython-35.pyc'
import 'errno' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\stat.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\stat.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\stat.cpython-35.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85815470>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\ntpath.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\ntpath.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\ntpath.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\genericpath.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\genericpath.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\genericpath.cpython-35.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85823240>
import 'ntpath' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC858157B8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_collections_abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_collections_abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_collections_abc.cpython-35.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85823860>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC853942B0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_sitebuiltins.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_sitebuiltins.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_sitebuiltins.cpython-35.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85394588>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\sysconfig.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\sysconfig.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\sysconfig.cpython-35.pyc'
import 'sysconfig' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC853947B8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\_bootlocale.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\_bootlocale.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\_bootlocale.cpython-35.pyc'
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC8595C6D8>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\__pycache__\cp1252.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\encodings\cp1252.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\encodings\\__pycache__\\cp1252.cpython-35.pyc'
import 'encodings.cp1252' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC8595CB00>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\types.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\types.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\types.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\functools.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\functools.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\functools.cpython-35.pyc'
import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\__pycache__\__init__.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\__init__.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\collections\\__pycache__\\__init__.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\operator.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\operator.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\operator.cpython-35.pyc'
import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC8599B6A0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\keyword.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\keyword.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\keyword.cpython-35.pyc'
import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859A59B0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\heapq.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\heapq.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\heapq.cpython-35.pyc'
import '_heapq' # <class '_frozen_importlib.BuiltinImporter'>
import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859A6278>
import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\reprlib.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\reprlib.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\reprlib.cpython-35.pyc'
import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859A6710>
import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85979198>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\weakref.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\weakref.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\weakref.cpython-35.pyc'
import 'weakref' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859B32E8>
import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85965E48>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\__pycache__\abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\collections\abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\collections\\__pycache__\\abc.cpython-35.pyc'
import 'collections.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC8596BE10>
import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859651D0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\__init__.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\__init__.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\warnings.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\warnings.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\warnings.cpython-35.pyc'
import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85974668>
import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC85965588>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\util.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\util.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\util.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\abc.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\abc.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\abc.cpython-35.pyc'
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\__pycache__\machinery.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\importlib\machinery.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\importlib\\__pycache__\\machinery.cpython-35.pyc'
import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859CDEF0>
import 'importlib.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859CD8D0>
# C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\__pycache__\contextlib.cpython-35.pyc matches C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\contextlib.py
# code object from 'C:\\Users\\rober\\AppData\\Local\\Programs\\Python\\Python35\\lib\\__pycache__\\contextlib.cpython-35.pyc'
import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859D6B70>
import 'importlib.util' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC859C2F28>
# possible namespace for C:\Users\rober\AppData\Local\Programs\Python\Python35\lib\site-packages\google
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x000001AC8538AD68>
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
>>>
>>>
^C
C:\Users\rober>
C:\Users\rober>python3 -v
"python3" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

C:\Users\rober>cd ..

C:\Users>cd..

C:\>cd nester

C:\nester>python setup.py sdist
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 nester-1.0.0
making hard links in nester-1.0.0...
hard linking nester.py -> nester-1.0.0
hard linking setup.py -> nester-1.0.0
creating dist
creating 'dist\nester-1.0.0.zip' and adding 'nester-1.0.0' to it
adding 'nester-1.0.0\nester.py'
adding 'nester-1.0.0\PKG-INFO'
adding 'nester-1.0.0\setup.py'
removing 'nester-1.0.0' (and everything under it)

C:\nester>python setup.py install
running install
running build
running build_py
creating build
creating build\lib
copying nester.py -> build\lib
running install_lib
copying build\lib\nester.py -> C:\Users\rober\AppData\Local\Programs\Python\Python35\Lib\site-packages
byte-compiling C:\Users\rober\AppData\Local\Programs\Python\Python35\Lib\site-packages\nester.py to nester.cpython-35.pyc
running install_egg_info
Writing C:\Users\rober\AppData\Local\Programs\Python\Python35\Lib\site-packages\nester-1.0.0-py3.5.egg-info

C:\nester>

Blogger Widgets