开始使用Python编程
Python - 開始使用Python編程
Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs.
在我使用Ubuntu做為我的操作系統以來,根據我的體會上面說的沒錯。功能強大,簡單靈活的腳本語言。即使你使用windows搭建Python的運行環境也很簡單。
Python官方網站:?http://www.python.org/
?
我使用Ubuntu 12.04 LTS,Python包是默認安裝的。如果你使用Windows,要去官網上下載Windows的Installer,之后將包含python.exe的安裝目錄加入系統環境變量Path中,你就可以使用python命令了,腳本的執行要依賴這個python.exe。
?
如何運行Python腳本?
?
Python腳本是以.py結尾的文件,在Linux系統下有兩種執行方式
假設你有腳本hello.py,
./hello.py或者
python hello.py如何查看我的python版本?
python --version如何知道python指令安裝在什么位置?
which python第一個python腳本hello.py
#!/usr/bin/python print 'Hello, world!'保存文件,賦給它可執行權限,執行
python hello.py?
?
?
轉載于:https://www.cnblogs.com/m0488/archive/2013/05/12/3073975.html
總結
以上是生活随笔為你收集整理的开始使用Python编程的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《101 Windows Phone 7
- 下一篇: Python中的bytes,str,in