这是我最近写的一个将Camel发布在maven2的shapshot schema 拷贝到指定目录下的
python小脚本。
发现自己开始迷恋上了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吧。
分享到:
相关推荐
When it comes to creating powerful and effective hacking tools, Python is the language of choice for most security analysts. But just how does the magic happen? In Black Hat Python, the latest from ...
This book will help you to understand the basics of python in just 7 days. Code is the language of the future. And the time to learn the ins and outs of coding is now, unless of course you want to be ...
Master Python scripting to build a network and ... By the end of this book, you will be able to get the most out of the Python language to build secure and robust networks that are resilient to attacks.
This book is an introduction to the Python programming language for complete beginners – those who have never written a program before, or who are just getting started with programming. Learning your...
The Python programming language was created in the early 1990s for use in system administration. It has been a great success in this area and gained wide adoption. It is a general-purpose programming...
Shaw teaches the Python programming language through a series of 52 brilliantly-crafted exercises-all formatted consistently, and most no longer than two pages (including 'extra credit'). Just read ...
But, must importantly — it exposes that Python, the programing language, is indeed comprised of persons, just like you, trying to make a difference in the world, one step at a time.
LazyProgrammer, "Natural Language Processing in Python: Master Data Science and Machine Learning for spam detection, sentiment analysis, latent semantic analysis, and article spinning" 2016 | ASIN: ...
Perhaps you are an amateur just getting started with Python, or maybe you already know a few things about this exciting programming language and you'd like to reach for the next level. Which one are ...
For the engineer who is already proficient in Java, it would be a waste of time to study a Python textbook that begins with the basic concept of object-oriented programming, since the concept of OOP ...
Think Python is ideal for students at the high school or college level, as well as self-learners, home-schooled students, and professionals who need to learn programming basics. Beginners just ...
Python is rapidly becoming the standard language for many talks in scientific research, and is particularly popular in biology and bioinformatics. One of the great strengths of Python is the ecosystem...
Head First Python文档,这是官方的PDF,清晰度高。the basics Getting Started Quickly ... Along the way, you’ll learn about a few of the things that make Python the programming language it is.