Skip to content

xx-moos/py-learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-learn

py learn

smartrun.py 是用于在虚拟环境中运行 Python 脚本的工具。

Windows 设置

创建批处理文件 smartrun.bat:

@echo off

python %USERPROFILE%\scripts\smartrun.py %*

添加到 PATH:

将 smartrun.bat 所在目录添加到系统环境变量 PATH 中

MacOS/Linux 设置

添加执行权限:

chmod +x ~/scripts/smartrun.py

创建符号链接:

创建 bin 目录(如果不存在)

mkdir -p ~/bin

创建符号链接

ln -s ~/scripts/smartrun.py ~/bin/smartrun

添加到 PATH(如果使用 zsh):

echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc

source ~/.zshrc

使用方法

基本使用

smartrun your_script.py

带参数

smartrun your_script.py arg1 arg2

指定文件路径

smartrun /path/to/your/script.py

About

py learn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published