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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux如何開啟pythonLinuxPython
- Python開發環境詳細配置Anaconda---Linux篇Python開發環境Linux
- Python 開發環境搭建(03):Linux 下 eclipse 安裝Python開發環境LinuxEclipse
- python開發例項-python開發案例Python
- Linux開發技巧分享Linux
- Linux遠端開發Linux
- python開發框架Python框架
- Python開發IDEPythonIDE
- python 開發介面Python
- Python Web開發PythonWeb
- Python開發之路Python
- Linux嵌入式系統開發,嵌入式Linux開發教程Linux
- JetBrains PyCharm 2024.2 (macOS, Linux, Windows) - 面向專業開發者的 Python IDEAIPyCharmMacLinuxWindowsPythonIDE
- Linux 環境 + 本地開發Linux
- Linux命令和開發工具Linux
- Linux搭建開發環境Linux開發環境
- Python開發到底選擇哪個系統合適?Linux還是Windows?PythonLinuxWindows
- Python的web開發PythonWeb
- Python的開發之路Python
- python專案開發Python
- Python開發實戰Python
- Python 微服務開發--Python Microservices DevelopmentPython微服務ROSdev
- 學python可以做Web開發嗎?python適合Web開發嗎?PythonWeb
- Python屬於後端開發還是前端開發?Python入門!Python後端前端
- 作為一名Python開發,我談Linux和mac的使用體驗PythonLinuxMac
- Python開發篇——構建虛擬Python開發環境(Conda+Poetry)Python開發環境
- 開發環境配置 - Linux(Ubuntu)開發環境LinuxUbuntu
- Linux與開源發展迅猛Linux
- linux開發常用命令Linux
- 開發者必備Linux命令Linux
- java開發中常用linux命令JavaLinux
- linux開發環境搭建(ubuntu)Linux開發環境Ubuntu
- Python Web開發:從 wsgi 開始PythonWeb
- Python開發技巧-使用Python生成HTML表格PythonHTML
- Python開發【前端篇】HTMLPython前端HTML
- Python中WEB開發(一)PythonWeb
- Python可以開發APP嗎?PythonAPP
- Python IDE開發環境PythonIDE開發環境
- 【Python】GUI開發筆記PythonGUI筆記