Hi,
i am beginner in python programming,can you please let me know.what is difference in between the python Package and python library,


Thanks
Mukthyar

A Python package is a reference to the name of the folder containing a number of files. A library is the reference to a specific file, can be a .py file.

For instance in Python2 you use:
import Tkinter
this uses file Tkinter.py somewhere in your Lib folder.
Module names are case sensitive.

In Python3 this has changed to a package and you use:
import tkinter
this uses the files in a subfolder called tkinter in your Lib or Lib/site-packages folder.
Package subfolders have a file __init__.py in them.
Python will look at this file first.
Package names are also case sensitive.
By convention package names are in lower case.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.