zhouyang209117

shell脚本调用python模块

python helloworld.py代码为

# coding:utf-8
from __future__ import print_function
import sys
print(sys.path)

shell脚本run.sh为

#! /bin/bash
# 注意上面一行不是注释
PATH=/home/anaconda3/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
python -m helloworld
exit 0

执行sh run.sh就能运行.

分类:

技术点:

相关文章:

  • 2021-10-18
  • 2022-02-06
  • 2021-06-14
  • 2021-07-22
  • 2021-11-05
  • 2021-11-18
  • 2021-10-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-05
  • 2021-05-27
  • 2021-11-20
  • 2021-10-15
  • 2021-11-20
  • 2021-11-20
相关资源
相似解决方案