Skip to content

Chancylin/python_module_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

lcx: 2020/01/06

This is a quick tutorial example to show how a python package is built.

  1. Structure of the package;
  2. Necessary files: setup.py, _init.py_.
  3. Specially, one needs to pay attention to the code in__init.py__.
from .Gaussiandistribution import Gaussian

With this line in _init.py_, one can use

from distribution import Gaussian

to import Gassian directly. Otherwise,

from distribution..Gaussiandistribution import Gaussian

About

an example for build a python module

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages