Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the _ _ file__ attribute in python

Shulou Source: shulou.com Published: 2022-05-31 17:50:47 09月21日 Update

This article mainly introduces the relevant knowledge of how to use the _ _ file__ attribute in python, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this article on how to use the _ _ file__ attribute in python. Let's take a look.

Description

1. This _ _ file__ attribute is a special property of the module, similar to _ _ name__.

2. Each test is written in a Python script with the name of the test script file as the title. These scripts are then executed to print the state using the _ file__ special attribute.

Example

Project/ | ├── tests/ | ├── test_commanding.py | ├── test_power.py | ├── test_wireHousing.py | └── test_leds.py | └── main.py 's article on "how to use the _ _ file__ attribute in python" ends here. Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use the _ _ file__ attribute in python". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Attributes knowledge scripts special content articles tests values names examples easy to operate files articles easy to understand more title module status look industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Microsoft Huawei Shulou Tech Info vpn