|
发表于 2023-11-17 01:10:08
|
显示全部楼层
- Python 3.11.5 (main, Sep 2 2023, 14:16:33) [GCC 13.2.1 20230801]
- Type 'copyright', 'credits' or 'license' for more information
- IPython 8.17.2 -- An enhanced Interactive Python. Type '?' for help.
- In [1]: import sys
- In [2]: sys.path
- Out[2]:
- ['/usr/bin',
- '/usr/lib/python311.zip',
- '/usr/lib/python3.11',
- '/usr/lib/python3.11/lib-dynload',
- '',
- '/usr/lib/python3.11/site-packages']
- In [3]: import os
- In [4]: os.system('cat /usr/lib/python3.11/site-packages/hello.py')
- #!/usr/bin/env python
- #coding=utf-8
- def hello():
- print('hello')
- Out[4]: 0
- In [5]: import hello
- In [6]: hello.hello()
- hello
- In [7]:
复制代码 |
|