#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
第一个统信/麒麟OS AI程序
向信创AI世界问好!
"""

import datetime
import platform

def get_system_info():
    """获取系统信息"""
    return {
        '系统': platform.system(),
        '版本': platform.version(),
        '架构': platform.machine(),
        '处理器': platform.processor(),
        'Python版本': platform.python_version()
    }

def print_welcome():
    """打印欢迎信息"""
    # 获取当前时间
    now = datetime.datetime.now()
    time_str = now.strftime("%Y年%m月%d日 %H:%M:%S")
    
    # 获取系统信息
    sys_info = get_system_info()
    
    # 打印欢迎横幅
    print("=" * 60)
    print(" " * 15 + "*** 你好,信创AI世界!***")
    print("=" * 60)
    print()
    
    # 打印系统信息
    print("# 系统环境信息:")
    print("-" * 40)
    for key, value in sys_info.items():
        print(f"  {key:12s}: {value}")
    
    print()
    print("# 开发环境状态:")
    print("-" * 40)
    print("  ✓ 国产操作系统: 统信/麒麟OS")
    print("  ✓ 编程语言: Python 3")
    print("  ✓ 开发状态: 就绪")
    print("  ✓ 当前时间:", time_str)
    
    print()
    print("# 你可以开始:")
    print("  1. 使用Pandas处理数据")
    print("  2. 使用Pyecharts创建可视化")
    print("  3. 使用Scikit-learn构建AI模型")
    print("  4. 调用国产大模型API开发智能应用")
    
    print()
    print("=" * 60)
    print("# 科技自立自强,从每一行代码开始!")
    print("=" * 60)

if __name__ == "__main__":
    print_welcome()

统信UOS运行结果:

$ cd AI_Projects
$ source ai_env/bin/activate
(ai_env) $ python3 hello_xinchuang.py
============================================================
               *** 你好,信创AI世界!***
============================================================

# 系统环境信息:
----------------------------------------
  系统          : Linux
  版本          : #20.00.00.30 SMP PREEMPT_DYNAMIC Thu Jun  6 15:17:05 CST 2024
  架构          : x86_64
  处理器        : 
  Python版本    : 3.7.3

# 开发环境状态:
----------------------------------------
  ✓ 国产操作系统: 统信/麒麟OS
  ✓ 编程语言: Python 3
  ✓ 开发状态: 就绪
  ✓ 当前时间: 2026年03月11日 09:46:24

# 你可以开始:
  1. 使用Pandas处理数据
  2. 使用Pyecharts创建可视化
  3. 使用Scikit-learn构建AI模型
  4. 调用国产大模型API开发智能应用

============================================================
# 科技自立自强,从每一行代码开始!
============================================================
(ai_env) $ 

麒麟OS运行结果:

$ cd AI_Projects
$ source ai_env/bin/activate
(ai_env) $ python3 hello_xinchuang.py
============================================================
               *** 你好,信创AI世界!***
============================================================

# 系统环境信息:
----------------------------------------
  系统          : Linux
  版本          : #156r4 SMP Sat Jun 20 10:58:38 CST 2026
  架构          : x86_64
  处理器         : x86_64
  Python版本    : 3.8.8

# 开发环境状态:
----------------------------------------
  ✓ 国产操作系统: 统信/麒麟OS
  ✓ 编程语言: Python 3
  ✓ 开发状态: 就绪
  ✓ 当前时间: 2026年07月11日 14:27:43

# 你可以开始:
  1. 使用Pandas处理数据
  2. 使用Pyecharts创建可视化
  3. 使用Scikit-learn构建AI模型
  4. 调用国产大模型API开发智能应用

============================================================
# 科技自立自强,从每一行代码开始!
============================================================
(ai_env) $ 
Logo

openEuler 是由开放原子开源基金会孵化的全场景开源操作系统项目,面向数字基础设施四大核心场景(服务器、云计算、边缘计算、嵌入式),全面支持 ARM、x86、RISC-V、loongArch、PowerPC、SW-64 等多样性计算架构

更多推荐