Python Linux開發
If you’re a programmer and you use Linux but you haven’t yet entered the amazing world that is Python development, you’re really missing out on something special. For years, I dismissed Python as just another script. kiddie language, eschewing it for more “serious” languages like Java and C#. What I was missing out on were the heady days of rapid development that I so enjoyed while hacking away on Visual Basic .NET in my early years of university.
There was a time when nary a day would go by without me slinging together some code into a crappy Windows Forms application that I wrote to play with a new idea or to automate an annoying task. By and large, these small projects ceased when I moved over to Linux, partially out of laziness, and partially because I missed the rapid prototyping environment that Visual Basic .NET provided. Let’s face it – Java and C# are great languages, but getting a basic forms app set up in either of them takes a significant amount of time and effort.
Enter Python, git/github, pip, and virtualenv. This basic tool chain has got me writing code in my spare time again, and the feeling is great. So without further ado, let me present (yet another) quick tutorial on how to set up a bad-ass Python development environment of your own:
There was a time when nary a day would go by without me slinging together some code into a crappy Windows Forms application that I wrote to play with a new idea or to automate an annoying task. By and large, these small projects ceased when I moved over to Linux, partially out of laziness, and partially because I missed the rapid prototyping environment that Visual Basic .NET provided. Let’s face it – Java and C# are great languages, but getting a basic forms app set up in either of them takes a significant amount of time and effort.
Enter Python, git/github, pip, and virtualenv. This basic tool chain has got me writing code in my spare time again, and the feeling is great. So without further ado, let me present (yet another) quick tutorial on how to set up a bad-ass Python development environment of your own:
Step 1: Python
If there’s one thing that I really love about Python, it’s the wide availability of libraries for most any task that one can imagine. An important part of the rapid prototyping frame. of mind is to not get bogged down on writing low-level libraries.
If you have to spend an hour or two writing a custom database interface layer, you’re going to lose the drive that got you started in on the project in the first place. Unless of course, the purpose of the project was to re-invent the database interface layer. In that case, all power to you.
In my experience, this is never a problem with Python, as its magical import statement will unlock a world of possibilities that is occupied by literally thousands of libraries to do most anything that you can imagine.
Install this bad boy with the simple command sudo apt-get install python and then find yourself a good python tutorial with which to learn the basics. Alternatively, you can just start hacking away and use StackOverflow to fill in any of the gaps in your knowledge.
Step 2: Git/Github
In my professional life, I live and die by source control. It’s an excellent way to keep track of the status of your project, try out new features or ideas without jeopardizing the bits of your application that already work, and perhaps most importantly, it’s a life saver when you can’t figure out why in the hell you decided to do something that seemed like a good idea at the time but now seems like a truly retarded move.
If you work with other developers, it’s also a great way to find out who to blame when the build is broken.
So why Git? Well, if time is on your side, go watch this 1 hour presentation by Linus Torvalds; I guarantee that if you know the first thing about source control, he will convince you to switch. If you don’t have that kind of time on your hands (and really, who does?) suffice it to say that Git plays really well with Github, and Github is like programming + social media + crack.
Basically, it’s a website that stores your public (or private) repositories, showing off your code for all the world to see and fork and hack on top of. It also allows you to find and follow other interesting projects and libraries, and to receive updates when they make a change that you might be interested in.
Need a library to do fuzzy string matching? Search Git and find fuzzywuzzy. Install it into your working environment, and start playing with it. If it doesn’t do quite what you need, fork it, check out the source, and start hacking on it until it does! Github is an amazing way to expand your ability to rapid prototype and explore ideas that would take way too long to implement from scratch.
Get started by installing git with the command sudo apt-get install git-core. You should probably also skim through the git tutorial, as it will help you start off on the right foot.
Next, mosey on over to Github and sign up for an account. Seriously, it’s awesome, stop procrastinating and do it.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-742611/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- python開發例項-python開發案例Python
- Python 3: 加密簡介-軟體開發|Linux.中國-開源社群Python加密Linux
- 在 Linux 環境 Python 下開發全文索引(轉)LinuxPython索引
- python 開發介面Python
- Python開發之路Python
- Python Web開發PythonWeb
- python開發框架Python框架
- linux如何開啟pythonLinuxPython
- Python 開發環境搭建(03):Linux 下 eclipse 安裝Python開發環境LinuxEclipse
- Python開發環境詳細配置Anaconda---Linux篇Python開發環境Linux
- Python 全棧開發 -- 開發環境篇Python全棧開發環境
- python專案開發Python
- Python開發IDEPythonIDE
- Python開發實戰Python
- Python的web開發PythonWeb
- Python的開發之路Python
- python開發環境Python開發環境
- Linux開發技巧分享Linux
- Linux下開發-alarmLinux
- Linux下開發-reallocLinux
- Linux下開發CLinux
- Linux遠端開發Linux
- Python屬於後端開發還是前端開發?Python入門!Python後端前端
- 學python可以做Web開發嗎?python適合Web開發嗎?PythonWeb
- Linux嵌入式系統開發,嵌入式Linux開發教程Linux
- Python Web開發:從 wsgi 開始PythonWeb
- 【Python】virtualenv搭建python開發環境Python開發環境
- python能開發前端嗎Python前端
- python可以開發遊戲嗎Python開發遊戲
- Python開發【前端篇】HTMLPython前端HTML
- Python開發常見漏洞Python
- Python可以開發APP嗎?PythonAPP
- Python的開發環境Python開發環境
- Python中WEB開發(一)PythonWeb
- python開發編譯器Python編譯
- python開發環境搭建Python開發環境
- Python 開發命令列工具Python命令列
- 搭建python開發環境Python開發環境