zoukankan      html  css  js  c++  java
  • 什么是Python?Python的设计哲学?如何获取/升级Python?

    • Python?

    Python(英国发音:/ˈpaɪθən/ 美国发音:/ˈpaɪθɑːn/

    Python的创始人为吉多·范罗苏姆Guido van Rossum

    1989年的圣诞节期间吉多·范罗苏姆为了在阿姆斯特丹打发时间,决心开发一个新的脚本解释程序,作为ABC语言的一种继承。

    之所以选中Python作为程序的名字,是因为他是BBC电视剧——蒙提·派森的飞行马戏团Monty Python‘s Flying Circus)的爱好者。

     

    Import this

     

    1. Beautiful is better than ugly.
    2. Explicit is better than implicit.
    3. Simple is better than complex.
    4. Complex is better than complicated.
    5. Flat is better than nested.
    6. Sparse is better than dense.
    7. Readability counts.
    8. Special cases aren't special enough to break the rules.
    9. Although practicality beats purity.
    10. Errors should never pass silently.
    11. Unless explicitly silenced.
    12. In the face of ambiguity, refuse the temptation to guess.
    13. There should be one-- and preferably only one --obvious way to do it.
    14. Although that way may not be obvious at first unless you're Dutch.
    15. Now is better than never.
    16. Although never is often better than *right* now.
    17. If the implementation is hard to explain, it's a bad idea.
    18. If the implementation is easy to explain, it may be a good idea.

     

     

    官网:www.python.org

    任何一台Linux系统上   

    PythonXY, portable python   

     

    RedHat升级Python版本

     

        1. Python版本:

        # python -V

       

        2.1 下载Python

        2.2 解压缩Python-3.4.7.tgz安装包

                  tar -zxvf Python-3.4.7.tgz

     

        2.3 进入解压后的目录并进行编译安装

        cd Python-3.4.7

        mkdir /usr/local/python3.4.7

        ./configure --prefix=/usr/local/python3.4.7

        make

        make install

          #备份python旧版本信息

        mv /usr/bin/python /usr/bin/python2.6_old

        #删除旧链接并重新创建链接

        rm /usr/bin/python2

        ln -s /usr/bin/python2.6_old /usr/bin/python2

        #重新建立Python3.4.7的环境变量

        ln -s /usr/local/python3.4.7/bin/python3.7 /usr/bin/python

    Hello world!>>> print ("hello world")

     
  • 相关阅读:
    element-ui表格数据为空及数据使用html包裹的实现
    Vue 生命周期深入
    element-ui使用Radio单选表格行
    跨浏览器事件封装
    fontsize.js
    js使用Canvas对象绘制圆环
    银行卡信息生成
    数组中对象的去重
    es6冻结对象及其属性
    clip属性
  • 原文地址:https://www.cnblogs.com/thescentedpath/p/pythonintroduce.html
Copyright © 2011-2022 走看看