Coverage for aipyapp/runtime.py: 0%

1#!/usr/bin/env python3

2# -*- coding: utf-8 -*-

3

4""" 实现兼容 aipy/runtime.py 的接口，支持模块级方法调用 """

5 import os

6

7 def install_packages(*packages):

8 print(f"[install_packages] 需要安装的包: {packages}")

9 return True

10

11 def get_env(name, default=None, *, desc=None):

12 return os.environ.get(name, default)

13

14 def display(path=None, url=None):

15 if path:

16 print(f"[display] 显示本地文件: {path}")

17 elif url:

18 print(f"[display] 显示网络资源: {url}")

19 else:

20 print("[display] 未提供 path 或 url")

21

22 def input(prompt=''):

23 return __builtins__.input(prompt)

24

25 def get_block_by_name(block_name):

26 pass

27