Python is just the language for you

这是我最近写的一个将Camel发布在maven2的shapshot schema 拷贝到指定目录下的[url=https://svn.apache.org/repos/asf/activemq/scripts/copy_snapshot_xsd.py]python小脚本[/url]。

发现自己开始迷恋上了python,体验着一种新的写程序的方式。
以前不管是用bash 还是写windows bat,就是简单的设置一下环境变量然后调用一下写好的程序,很少做一些逻辑的判断(小声说,复杂的我也不会)。而用python在写脚本的同时不刻意拘泥与C++或者Java的强类型处理,简单几行代码就完成了处理文件的操作,突然感觉写程序会如此的轻松。

下面是从python tutorise 上面拷贝下来的,你在什么的情况下使用python.


If you do much work on computers, eventually you find that there's some task you'd like to automate. For example, you may wish to perform a search-and-replace over a large number of text files, or rename and rearrange a bunch of photo files in a complicated way. Perhaps you'd like to write a small custom database, or a specialized GUI application, or a simple game.

If you're a professional software developer, you may have to work with several C/C++/Java libraries but find the usual write/compile/test/re-compile cycle is too slow. Perhaps you're writing a test suite for such a library and find writing the testing code a tedious task. Or maybe you've written a program that could use an extension language, and you don't want to design and implement a whole new language for your application.

作为对传统语言的扩展,你可以把 python看成是一个超级胶水,通过这个超级胶水可以让在已有的库函数上快速构建自己需要的应用,如果当前的库不好用,或者没有适合你的使用的库,你可以用C或者Java写一个简单的扩展然后交给python来调用。

如果你想让你做的系统操作更简单,或者把你从沉重而重复的命令行指令中解脱出来,和我一样学习python吧。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值