Python reference package, file, class

Source: Internet
Author: User

---restore content starts---

File directory structure:

----Pythontest

|----main.py

|----showutil.py

|----utils

|----__init__.py

|----logutil.py

main.py

# !/usr/bin/env Python3 # -*-coding:utf-8-*-  from Import *fromimport *print(' I am the main entry file!  ')#  Call the Showutil tool class in the same directory xs = showutil () xs.show ()  #  Call the Logutil tool class in someone else's package dy = logutil () dy.log ()

showutil.py

# !/usr/bin/env Python3 # -*-coding:utf-8-*- Import SYS class Showutil (object):     def Show (self):         Print (' I am the Display tool class ')

logutil.py

# !/usr/bin/env Python3 # -*-coding:utf-8-*- class Logutil (object):     def log (self):         Print (' I am a log tool Class!  ')

  

---restore content ends---

Python reference package, file, class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.