V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
chenqh
V2EX  ›  Python

关于 Python invoke 的问题

  •  
  •   chenqh · 2023-02-01 21:43:01 +08:00 · 1645 次点击
    这是一个创建于 422 天前的主题,其中的信息可能已经有所发展或是发生改变。

    第一,如何共用 invoke 呢?

    第二,invoke 太多,怎么分出来,好看一些呢,我现在的 invoke 文件 2K 多行了,现在都是复制来复制去的,哎

    5 条回复    2023-02-03 08:55:27 +08:00
    noparking188
        1
    noparking188  
       2023-02-01 21:55:26 +08:00
    invoke 是啥老哥
    chenqh
        2
    chenqh  
    OP
       2023-02-01 21:58:00 +08:00
    @noparking188 python invoke 啊,类似 makefile 那种,只不过是 python 写的,可以更好的嵌入 python 代码
    noparking188
        3
    noparking188  
       2023-02-01 22:03:54 +08:00
    @chenqh #2 哦哦,感谢,我第一次听说这个,去看看
    vicalloy
        4
    vicalloy  
       2023-02-02 15:37:00 +08:00   ❤️ 1
    invoke 就是一个标准的 python 库,你按 python 标准库的方式管理就可以了。
    按照功能组织文件,按需 import 进去。
    公共的的 invoke 可以放到一个公共的库里,然后用 submodule 的方式引用。
    beeeeeeat
        5
    beeeeeeat  
       2023-02-03 08:55:27 +08:00 via iPhone
    PYTHONPATH?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2832 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:36 · PVG 22:36 · LAX 07:36 · JFK 10:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.