Joke Collection Website - Cold jokes - How does Python import gm.api module?

How does Python import gm.api module?

1. Put the dependency package directory in *:\python*\Lib\site-packages\, which is the installation directory of python. First, determine whether __init__ exists. Py file in API directory. If not, please create a new one.

2. Open the API main running file and check the class name inside. The following is the main.py file, and the class is the dcVerCode class.

3. Take the class dcVerCode imported into main as an example. Open __init__. Py and enter: import dcVerCode from main, thus completing the specification of the dependency package.

4. Running environment: Python 2.6-2.7 dependency: no dependency. Installation: pip installation sinaweibopy