In [ ]:
# module is just a python program.

In [ ]:
# program1 - f1,f2,f3,f4 -> main program 
# program2 - g1,g2,g3,program1.f1

In [2]:
help()


Welcome to Python 2.7!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/2.7/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

help> modules

Please wait a moment while I gather a list of all available modules...

/usr/local/lib/python2.7/dist-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
  import gobject._gobject
No handlers could be found for logger "oneconf.distributor"
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
  set_interactive(1)
ANSI                anydbm              gtksourceview2      reportlab
AptUrl              apt                 gtkunixprint        repr
BaseHTTPServer      apt_inst            gzip                requests
Bastion             apt_pkg             hashlib             resource
BeautifulSoup       aptdaemon           heapq               rexec
BeautifulSoupTests  aptsources          hmac                rfc822
CDROM               argparse            hotshot             rlcompleter
CGIHTTPServer       array               html5lib            rmagic
Canvas              ast                 htmlentitydefs      robotparser
CommandNotFound     asynchat            htmllib             runpy
ConfigParser        asyncore            httplib             samba
Cookie              atexit              httplib2            sched
Crypto              atk                 idlelib             screen
DLFCN               audiodev            ihooks              select
Dialog              audioop             imaplib             serial
DocXMLRPCServer     autoreload          imghdr              sessioninstaller
Exscript            axi                 imp                 sets
Exscriptd           backports           importlib           setuptools
FSM                 backports_abc       imputil             sexy
FileDialog          base64              inspect             sgmllib
FixTk               bdb                 io                  sha
HTMLParser          binascii            ipykernel           shelve
IN                  binhex              ipython_genutils    shlex
IPython             bisect              ipywidgets          shutil
Image               bonobo              itertools           shutil_backports
ImageChops          bpdb                jinja2              signal
ImageColor          bpython             json                simplegeneric
ImageCrackCode      bsddb               jsonschema          singledispatch
ImageDraw           bz2                 jupyter             singledispatch_helpers
ImageEnhance        cPickle             jupyter_client      sip
ImageFile           cProfile            jupyter_console     sipconfig
ImageFileIO         cStringIO           jupyter_core        sipconfig_nd
ImageFilter         cairo               keyword             site
ImageFont           calendar            ldb                 sitecustomize
ImageGL             caribou             lib2to3             six
ImageGrab           certifi             libxml2             smbc
ImageMath           cgi                 libxml2mod          smtpd
ImageOps            cgitb               linecache           smtplib
ImagePalette        chardet             linuxaudiodev       sndhdr
ImagePath           chunk               locale              socket
ImageQt             cmath               lockfile            spwd
ImageSequence       cmd                 logging             spyderlib
ImageStat           code                lsb_release         spyderplugins
ImageTk             codecs              lxml                sqlite3
ImageWin            codeop              macpath             sre
MimeWriter          collections         macurl2path         sre_compile
MySQLdb             colorama            mailbox             sre_constants
ORBit               colorsys            mailcap             sre_parse
OpenSSL             commands            mako                ssl
PAM                 compileall          markupbase          stat
PIL                 compiler            markupsafe          statvfs
PSDraw              configglue          marshal             storemagic
PngImagePlugin      configobj           math                string
PyQt4               configparser        md5                 stringold
Queue               contextlib          mhlib               stringprep
ScrolledText        cookielib           mimetools           strop
SimpleDialog        copy                mimetypes           struct
SimpleHTTPServer    copy_reg            mimify              subprocess
SimpleXMLRPCServer  crypt               mistune             sunau
SocketServer        csv                 mmap                sunaudio
StringIO            ctypes              modulefinder        symbol
TYPES               cups                multifile           sympyprinting
Tix                 cupshelpers         multiprocessing     symtable
TkExscript          curl                mutex               sys
Tkconstants         curses              mysql               sysconfig
Tkdnd               cv                  nbconvert           syslog
Tkinter             cv2                 nbformat            tabnanny
UbuntuSystemService cythonmagic         netrc               talloc
UserDict            datetime            new                 tarfile
UserList            dbhash              nis                 tdb
UserString          dbm                 nntplib             telnetlib
_LWPCookieJar       dbus                notebook            tempfile
_MozillaCookieJar   deb822              ntdb                terminado
__builtin__         debconf             ntpath              termios
__future__          debian              nturl2path          test
_abcoll             debian_bundle       numbers             tests
_ast                debtagshw           numpy               textwrap
_bisect             decimal             oauthlib            this
_bsddb              decorator           oneconf             thread
_codecs             defer               opcode              threading
_codecs_cn          difflib             operator            tidy
_codecs_hk          dircache            optparse            time
_codecs_iso2022     dirspec             os                  timeit
_codecs_jp          dis                 os2emxpath          tkColorChooser
_codecs_kr          distlib             ossaudiodev         tkCommonDialog
_codecs_tw          distutils           pango               tkFileDialog
_collections        dns                 pangocairo          tkFont
_csv                doctest             paramiko            tkMessageBox
_ctypes             drv_libxml2         parser              tkSimpleDialog
_ctypes_test        dsextras            parted              toaiff
_curses             dumbdbm             pathlib2            token
_curses_panel       dummy_thread        pdb                 tokenize
_dbus_bindings      dummy_threading     pexpect             tornado
_dbus_glib_bindings duplicity           pickle              trace
_elementtree        easy_install        pickleshare         traceback
_functools          email               pickletools         traitlets
_hashlib            encodings           pip                 ttk
_heapq              entrypoints         pipes               tty
_hotshot            errno               piston_mini_client  turtle
_io                 exceptions          pkg_resources       twisted
_json               fabfile             pkgutil             types
_locale             fabric              platform            ubuntu_sso
_lsprof             fcntl               plistlib            unicodedata
_markerlib          fdpexpect           popen2              unittest
_md5                feedparser          poplib              urllib
_multibytecodec     filecmp             posix               urllib2
_multiprocessing    fileinput           posixfile           urllib3
_mysql              fnmatch             posixpath           urlparse
_mysql_exceptions   formatter           pprint              user
_osx_support        fpectl              profile             uu
_ped                fpformat            prompt_toolkit      uuid
_pyio               fractions           pstats              validate
_random             ftplib              pty                 virtualenv
_sha                functools           ptyprocess          vte
_sha256             functools32         pwd                 warnings
_sha512             future_builtins     pxssh               wave
_smbc               gc                  py_compile          wcwidth
_socket             gconf               pyatspi             weakref
_sqlite3            gdbm                pyclbr              webbrowser
_sre                genericpath         pycurl              webkit
_ssl                getopt              pydoc               whichdb
_strptime           getpass             pydoc_data          widgetsnbextension
_struct             gettext             pyexpat             wsgiref
_symtable           gi                  pygments            xapian
_sysconfigdata      gio                 pygtk               xdg
_sysconfigdata_nd   glib                pygtkcompat         xdrlib
_testcapi           glob                pyinotify           xml
_threading_local    gnome               pynotify            xmllib
_tkinter            gnomecanvas         pyodbc              xmlrpclib
_warnings           gnomekeyring        pysqlite2           xxsubtype
_weakref            gnomevfs            qtconsole           zipfile
_weakrefset         gobject             quopri              zipimport
abc                 google              random              zlib
aifc                grp                 re                  zmq
antigravity         gtk                 readline            zope

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".

help> quit

You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)".  Executing "help('string')"
has the same effect as typing a particular string at the help> prompt.

In [ ]:
# cross-platform - for our window friends
# convience - to knwo what program it is - .py,.pl
# you can use it a module in future.

In [3]:
# import
import math

In [4]:
print dir(math)


['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'hypot', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']

In [5]:
print math.pi


3.14159265359

In [6]:
print help(math.pow)


Help on built-in function pow in module math:

pow(...)
    pow(x, y)
    
    Return x**y (x to the power of y).

None

In [7]:
print math.pow(2,5)


32.0

In [8]:
# using alias names
import math as m

In [9]:
print m.pi
print m.pow(2,5)


3.14159265359
32.0

In [ ]:
# Making your module function/variable part of your local name space.

In [10]:
from math import pow,pi

In [11]:
print pi
print pow(2,5)


3.14159265359
32.0

In [ ]:
# DONT TRY THIS AT HOME OR OFFICE
# from math import *

!/usr/bin/python

version = 1

def my_add(a,b): ''' This function is for addition of numbers and strings. ''' return a + b

def my_sub(a,b): ''' This is for substration from larger to smaller number. ''' if a > b: return a - b else: return b - a

def my_div(a,b): return a/b

def my_multi(a,b): return a * b

tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ ipython Python 2.7.6 (default, Jun 22 2015, 17:58:13) Type "copyright", "credits" or "license" for more information. IPython 5.1.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import first as f In [2]: print dir(first) --------------------------------------------------------------------------- NameError Traceback (most recent call last) in () ----> 1 print dir(first) NameError: name 'first' is not defined In [3]: print dir(f) ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'my_add', 'my_div', 'my_multi', 'my_sub', 'version'] In [4]: f.version Out[4]: 1 In [5]: n [7]: import first as f In [8]: f.version Out[8]: 1 In [9]: reload(f) Out[9]: In [10]: f.version Out[10]: 2 In [11]: tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ ls first.py first.pyc tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ file first.pyc first.pyc: python 2.7 byte-compiled tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ file first.py first.py: Python script, ASCII text executable tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ cat first.pyc  ��\Xc@s.dZd�Zd�Zd�Zd�ZdS(icC||S(s: This function is for addition of numbers and strings. ((tatb((first.pytmy_addscCs ||kr||S||SdS(s; This is for substration from larger to smaller number. N((RR((first.pytmy_sub s cC||S(N((RR((first.pytmy_divscC||S(N((RR((first.pymy_multisN(tversionRRRR(((first.py  tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $
In [1]: import first as f pushing some 1000 rs. In [2]: dir(f) Out[2]: ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'my_add', 'my_div', 'my_multi', 'my_sub', 'version'] In [3]: f.my_add Out[3]: In [4]: def foo(): ...: pass ...: In [5]: foo Out[5]: In [6]: print globals() {'_dh': [u'/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules'], '__': , '__builtin__': , 'quit': , '_i6': u'print globals()', '_i5': u'foo', '_i4': u'def foo():\n pass', '_i3': u'f.my_add', '_i2': u'dir(f)', '_i1': u'import first as f', '__package__': None, 'exit': , 'get_ipython': >, '_i': u'foo', 'foo': , '__doc__': 'Automatically created module for IPython interactive environment', '__builtins__': , '_ih': ['', u'import first as f', u'dir(f)', u'f.my_add', u'def foo():\n pass', u'foo', u'print globals()'], '__name__': '__main__', '___': ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'my_add', 'my_div', 'my_multi', 'my_sub', 'version'], '_': , '_sh': , 'f': , '_5': , '_3': , '_2': ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'my_add', 'my_div', 'my_multi', 'my_sub', 'version'], '_iii': u'f.my_add', '_ii': u'def foo():\n pass', 'In': ['', u'import first as f', u'dir(f)', u'f.my_add', u'def foo():\n pass', u'foo', u'print globals()'], '_oh': {2: ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'my_add', 'my_div', 'my_multi', 'my_sub', 'version'], 3: , 5: }, 'Out': {2: ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'my_add', 'my_div', 'my_multi', 'my_sub', 'version'], 3: , 5: }} In [7]:
In [1]: import math In [2]: import sys In [3]: sys.path Out[3]: ['', '/usr/local/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/local/lib/python2.7/dist-packages/IPython/extensions', '/home/tcloudost/.ipython'] In [4]: # /home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/extra In [5]: sys.path.insert(0,'/home/tcloudost/Documents/git_repositories/python-batches/batch-56/module ...: s/extra') In [6]: sys.path Out[6]: ['/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/extra', '', '/usr/local/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/local/lib/python2.7/dist-packages/IPython/extensions', '/home/tcloudost/.ipython']
# link for modules # https://docs.python.org/2/tutorial/modules.html # install tree: sudo apt-get install tree # creating the package structure. tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ mkdir os tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ mkdir os/{lin,sol,aix,hpux} tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ Tree output: tree os os |-- aix |-- hpux |-- lin `-- sol 4 directories, 0 files Tree output: # create some files under lin folder - first.py,second.py,third.py and fourth.py --- first.py --- #!/usr/bin/python def my_first_lin1(): return ' this is my first lin1 function' def my_second_lin1(): return ' this is my second lin1 function' def my_third_lin1(): return ' this is my third lin1 function' def my_fourth_lin1(): return ' this is my fourth lin1 function' Tree output: tree os os |-- aix |-- hpux |-- lin | |-- first.py | |-- fourth.py | |-- second.py | `-- third.py `-- sol 4 directories, 4 files # now go to ipython and try to import the folder lin. tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules/os $ ls aix hpux lin sol tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules/os $ ipython Python 2.7.6 (default, Jun 22 2015, 17:58:13) Type "copyright", "credits" or "license" for more information. IPython 5.1.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import lin --------------------------------------------------------------------------- ImportError Traceback (most recent call last) in () ----> 1 import lin ImportError: No module named lin In [2]: It failed. # to make the above folder work as package. create a __init__.py under the lin folder. --- __init__.py --- import first import second import third import fourth 4 directories, 4 files Tree output: tree os os |-- aix |-- hpux |-- lin | |-- first.py | |-- fourth.py | |-- __init__.py | |-- second.py | `-- third.py `-- sol 4 directories, 5 files In [2]: pwd Out[2]: u'/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/os' In [3]: import lin In [4]: lin. lin.first lin.second lin.fourth lin.third In [4]: lin.first.my_ lin.first.my_first_lin1 lin.first.my_second_lin1 lin.first.my_fourth_lin1 lin.first.my_third_lin1 In [2]: pwd Out[2]: u'/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/os' In [3]: import lin In [4]: lin.first.my_first_lin1() Out[4]: ' this is my first lin1 function' In [5]: lin.first.my_first_lin2() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ----> 1 lin.first.my_first_lin2() AttributeError: 'module' object has no attribute 'my_first_lin2' In [6]: lin.first.my_first_lin1() Out[6]: ' this is my first lin1 function' In [7]: lin.first.my_second_lin1() Out[7]: ' this is my second lin1 function' In [8]: lin.first.my_third_lin1() Out[8]: ' this is my third lin1 function' In [9]: lin.first.my_fourth_lin1() Out[9]: ' this is my fourth lin1 function' In [10]: lin.second.my_first_lin2() Out[10]: ' this is my first lin2 function' Tree output: tree os os |-- aix |-- hpux |-- lin | |-- first.py | |-- first.pyc | |-- fourth.py | |-- fourth.pyc | |-- __init__.py | |-- __init__.pyc | |-- second.py | |-- second.pyc | |-- third.py | `-- third.pyc `-- sol 4 directories, 10 files # copy all the linux files to solaris. command line: pwd /home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules command line: command line: cp os/lin/*.py os/sol/ command line: Tree output: tree os os |-- aix |-- hpux |-- lin | |-- first.py | |-- first.pyc | |-- fourth.py | |-- fourth.pyc | |-- __init__.py | |-- __init__.pyc | |-- second.py | |-- second.pyc | |-- third.py | `-- third.pyc `-- sol |-- first.py |-- fourth.py |-- __init__.py |-- second.py `-- third.py 4 directories, 15 files # modify the __init__.py under the sol folders and also make lin to sol in all *.py files. this is how your __init__.py looks like this is how the file __init__.py looks like import first import second import third In [11]: pwd Out[11]: u'/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/os' In [12]: import sol # implicit import ( reading __init__.py files) In [13]: sol. sol.first sol.second sol.third In [11]: pwd Out[11]: u'/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/os' In [12]: import sol In [13]: from sol import fourth # explicity import. In [14]: sol. sol.first sol.second sol.fourth sol.third # how to distribute a module : https://docs.python.org/2/distutils/ --- seeing the internals of a module In [15]: sys.path Out[15]: ['', '/usr/local/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/local/lib/python2.7/dist-packages/IPython/extensions', '/home/tcloudost/.ipython'] command line: cd /usr/lib/python2.7 command line: pwd /usr/lib/python2.7 command line: command line: ls dom etree __init__.py __init__.pyc parsers sax command line: ls dom/ domreg.py expatbuilder.pyc minicompat.py minidom.pyc pulldom.py xmlbuilder.pyc domreg.pyc __init__.py minicompat.pyc NodeFilter.py pulldom.pyc expatbuilder.py __init__.pyc minidom.py NodeFilter.pyc xmlbuilder.py command line: ls etree/ cElementTree.py ElementInclude.py ElementPath.py ElementTree.py __init__.py cElementTree.pyc ElementInclude.pyc ElementPath.pyc ElementTree.pyc __init__.pyc command line: ls parsers/ expat.py expat.pyc __init__.py __init__.pyc command line: ls sax/ _exceptions.py expatreader.py handler.py __init__.py saxutils.py xmlreader.py _exceptions.pyc expatreader.pyc handler.pyc __init__.pyc saxutils.pyc xmlreader.pyc command line: command line: pwd /usr/lib/python2.7/xml command line:
Installation of modules ------------------------------ * os sudo apt-get install yum install * python # pip install # easy_install # setuptools
# virtualenv https://virtualenv.pypa.io/en/stable/installation/ tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56 $ cd modules/ tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ ls extra os second.py tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ virtualenv sheets New python executable in sheets/bin/python Installing setuptools, pip...done. tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ ls extra os second.py sheets tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ ls sheets bin include lib local tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ source sheets/bin/activate (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ pip freeze argparse==1.2.1 wsgiref==0.1.2 (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ pip install excel Downloading/unpacking excel Downloading excel-1.0.0.tar.gz Running setup.py (path:/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/sheets/build/excel/setup.py) egg_info for package excel Downloading/unpacking xlrd (from excel) Downloading xlrd-1.0.0.tar.gz (2.6MB): 2.6MB downloaded Running setup.py (path:/home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/sheets/build/xlrd/setup.py) egg_info for package xlrd warning: no files found matching 'README.html' Installing collected packages: excel, xlrd Running setup.py install for excel Running setup.py install for xlrd changing mode of build/scripts-2.7/runxlrd.py from 644 to 755 warning: no files found matching 'README.html' changing mode of /home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules/sheets/bin/runxlrd.py to 755 Successfully installed excel xlrd Cleaning up... (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ pip freeze argparse==1.2.1 excel==1.0.0 wsgiref==0.1.2 xlrd==1.0.0 (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import excel >>> quit() (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ ls extra my_excel.py os second.py sheets tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ ls extra my_excel.py os second.py sheets tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ python my_excel.py Traceback (most recent call last): File "my_excel.py", line 1, in import excel ImportError: No module named excel tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ source sheets/bin/activate (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ pwd /home/tcloudost/Documents/git_repositories/python-batches/batch-56/modules (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ python my_excel.py (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ (sheets)tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ deactivate tcloudost@tcloudost-VirtualBox ~/Documents/git_repositories/python-batches/batch-56/modules $ --- pydoc --- tcloudost@tcloudost-VirtualBox ~ $ pydoc sys tcloudost@tcloudost-VirtualBox ~ $ pydoc math tcloudost@tcloudost-VirtualBox ~ $ cd python-examples/ tcloudost@tcloudost-VirtualBox ~/python-examples $ cd batch-56 tcloudost@tcloudost-VirtualBox ~/python-examples/batch-56 $ cd modules/ tcloudost@tcloudost-VirtualBox ~/python-examples/batch-56/modules $ ls extra my_excel.py os second.py sheets tcloudost@tcloudost-VirtualBox ~/python-examples/batch-56/modules $ cd extra/ tcloudost@tcloudost-VirtualBox ~/python-examples/batch-56/modules/extra $ ls first.py first.pyc tcloudost@tcloudost-VirtualBox ~/python-examples/batch-56/modules/extra $ pydoc first tcloudost@tcloudost-VirtualBox ~/python-examples/batch-56/modules/extra $