コード例 #1
0
#!/usr/bin/env python
import samplelib  # <1>

samplelib.spam()  # <2>
samplelib.ham()

コード例 #2
0
#!/usr/bin/env python

# Import functions spam and ham from samplelib module into current namespace
# Does not create the module object
from samplelib import spam, ham

# Module name not needed to call function spam()
spam()
ham()