Google 发布 Python Fire:
https://opensource.googleblog.com/2017/03/python-fire-command-line.html?m=1
想看,自建 ss 服务器,打不开上面链接,为啥?
1
artandlol 2017-03-03 11:46:42 +08:00
没问题啊
|
2
openbaby 2017-03-03 11:52:42 +08:00 1
不用梯子的话, www.onedns.net 可打开
翻翔打不开,肯定是你姿势不对,或者梯子太软,爬到半空梯子塌了,哈哈。 |
3
nicevar 2017-03-03 12:02:58 +08:00
ss 客户端配置有问题,试着加入白名单看看
|
4
blackshadow 2017-03-03 13:06:40 +08:00
我的 ss 也打不开。。。。
|
5
oldliu 2017-03-03 13:13:06 +08:00
找不到博客
找不到您要查找的博客。如果您是此博客的拥有者,请登录。 转到 Blogger 。。。 |
6
zengshusen 2017-03-03 15:23:33 +08:00 via Android
Open Source Blog
News about Google's open source student programs and software releases Introducing Python Fire, a library for automatically generating command line interfaces Thursday, March 2, 2017 Today we are pleased to announce the open-sourcing of Python Fire. Python Fire generates command line interfaces (CLIs) from any Python code. Simply call the Fire function in any Python program to automatically turn that program into a CLI. The library is available from pypi via `pip install fire`, and the source is available on GitHub. Python Fire will automatically turn your code into a CLI without you needing to do any additional work. You don't have to define arguments, set up help information, or write a main function that defines how your code is run. Instead, you simply call the `Fire` function from your main module, and Python Fire takes care of the rest. It uses inspection to turn whatever Python object you give it -- whether it's a class, an object, a dictionary, a function, or even a whole module -- into a command line interface, complete with tab completion and documentation, and the CLI will stay up-to-date even as the code changes. To illustrate this, let's look at a simple example. #!/usr/bin/env python import fire class Example(object): def hello(self, name='world'): """Says hello to the specified name.""" return 'Hello {name}!'.format(name=name) def main(): fire.Fire(Example) if __name__ == '__main__': main() When the Fire function is run, our command will be executed. Just by calling Fire, we can now use the Example class as if it were a command line utility. $ ./example.py hello Hello world! $ ./example.py hello David Hello David! $ ./example.py hello --name=Google Hello Google! Of course, you can continue to use this module like an ordinary Python library, enabling you to use the exact same code both from Bash and Python. If you're writing a Python library, then you no longer need to update your main method or client when experimenting with it; instead you can simply run the piece of your library that you're experimenting with from the command line. Even as the library changes, the command line tool stays up to date. At Google, engineers use Python Fire to generate command line tools from Python libraries. We have an image manipulation tool built by using Fire with the Python Imaging Library, PIL. In Google Brain, we use an experiment management tool built with Fire, allowing us to manage experiments equally well from Python or from Bash. Every Fire CLI comes with an interactive mode. Run the CLI with the `--interactive` flag to launch an IPython REPL with the result of your command, as well as other useful variables already defined and ready to use. Be sure to check out Python Fire's documentation for more on this and the other useful features Fire provides. Between Python Fire's simplicity, generality, and power, we hope you find it a useful library for your own projects. By David Bieber, Software Engineer on Google Brain Share on Google+ Share on Twitter Share on Facebook Labels: open source release , Python , releases Google Privacy Terms |
7
yylzcom 2017-03-03 15:26:17 +08:00
Introducing Python Fire, a library for automatically generating command line interfaces
Thursday, March 2, 2017 打开没问题…… 另外提问问题最好贴上 log ,不然谁都不能快速准确帮你解决问题 |
8
swulling 2017-03-03 15:27:25 +08:00
没问题,自己的梯子问题
|
9
xdeng 2017-03-03 15:29:15 +08:00
DNS
|
10
vnady OP <img href=" ">
|
11
vnady OP <img src=" ">
|
12
vnady OP ![log]( )
|
13
vnady OP |
14
yylzcom 2017-03-04 10:01:53 +08:00
@vnady #13 chrome 配合 switchyomega 试试看,我没编辑过 user-rule.txt
https://chrome.google.com/webstore/detail/padekgcemlokbadohgkifijomclgjgif 你的服务端日志没看到 googleblog 这个域名啊?你看我的日志里明显有出现 googleblog.com 这个域名 |
15
vnady OP @yylzcom 奇怪的是日志里没有出现 googleblog.com 这个域名。
|