Python - A Comprehensive Programming Language

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Python - A Comprehensive Programming Language - Presentation Transcript

    1. Python A Comprehensive Programming Language 胡崇偉 marr@citi.sinica.edu.tw Open Source Software Foundry
    2. 自由軟體鑄造場 • 營運網站以提供自由軟體專案進駐開發 • 提供系統技術與工具以協助軟體開發 • 研究開放源碼軟體授權條款與法律政策 議題並提供諮詢 • 媒合促成以自由軟體為基礎的本地成功 案例 • 報導國內外產業及社群新聞 • 進行人才培育及國際交流活動
    3. Service and Resource 專案管理
    4. Service and Resource 共同筆記 檔案下載 版本管理 專案管理 通信論壇 待辦事項 統計資訊
    5. Service and Resource 資源目錄 共同筆記 人才資料 檔案下載 版本管理 授權條款 專案管理 電子報 精靈 通信論壇 待辦事項 研究報告 統計資訊 推廣光碟 教學文件
    6. 軟體自由協會 • http://www.slat.org/ • 台灣推展軟體自由運動的社團法人 • 執行校園自由軟體應用諮詢中心計畫 • 協助社群代收贊助款項 • 舉辦研討會及推廣活動
    7. Python ?
    8. Python is a Dynamic Object-Oriented Programming Language
    9. Run-Time Typing • Python's run time must work harder than Java's. • a+b=? – inspect the objects a and b to find out their type, which is not known at compile time. – 7 + 11.0 – ‘Hello’ + ‘world’ – (1, 2, 3) + (4, 5, 6)
    10. >>> 是提示符號
    11. Interactive with Interpreter Edit Debug Compile Wait Deploy Print Read Eval Read-Eval-Print Loop
    12. Built-in DataTypes • Number 7, 11.0 elements elements • String ‘Hello World’ • List [7, 11, ‘store’] • Tuple (7, 11, ‘shop’) • Dictionary {‘name’:’marr’, ‘home’:’taipei’} keys
    13. MIT to Try Python in CS Courses
    14. Other Features • Cross Platform and Porting • Excellent Modules • Small • Efficient • Popular
    15. Nokia PyS60
    16. Indexing and Slicing 0 1 2 7 [ ↓ ↓ ↓ -6 ↓ -2 -1 ↓ ↓ ] I L o v e P y t h o n • myString = “I Love Python” • myString[0] == “I” • myString[-1] == “n” • myString[7:-2] == “Pyth”
    17. Code Indenting • No explicit begin or end • No curly braces if age > 18: print “You are old enough.” else: print “You are too young.”
    18. Function Example def myFunc(score): “”” document strings “”” import math math.sqrt(score) * 10
    19. File Handling fileobj = open(“myfile”, “r”) lines = fileobj.readlines() for line in lines: print line
    20. Socket Creation import socket s = socket.socket( socket.AF_INET, socket.SOCK_STREAM) s.connect( ("www.mysite.com", 80))
    21. Twisted - Networking Engine • A web server, numerous chat clients, chat servers, mail servers and more. • Supported protocols: TCP, SSL, multicast, HTTP, IMAP and more • Sample apps: BitTorrent, CIA Bot, BuildBot, apt-proxy2
    22. RestructuredText • http://docutils.sourceforge.net/ • Support Formats: HTML,XML,S5,LaTeX • rst2html < myRST.txt > myRST.html
    23. Version Control • Mercurial
    24. GUI Library and Toolkit
    25. Wingware IDE
    26. Python Package Index
    27. PyGame
    28. PyGame
    29. Blender
    30. Elephants Dream
    31. SQLAlchemy from sqlalchemy import * db = create_engine(‘sqlite:///tutorial.db’) metadata = MetaData(db) users = Table(‘users’, metadata, Column(‘user_id’, Integer, primary_key=True), Column(‘name’, String(40)), ) users.create() i = users.insert() i.execute(name=‘marr’)
    32. Web Frameworks
    33. Python Hosting
    34. Extending and Embedding $ swig -python example.i $ gcc -c example.c example_wrap.c -I/usr/local/include/python2.1 $ ld -shared example.o example_wrap.o -o _example.so >>> import example >>> example.fact(5) 120
    35. Self Learning – Where to Start • On-line Tutorial • Books – Google ‘python tutorial’ – Better in English
    36. Video Tutorials • http://www.showmedo.com/ • http://www.youtube.com/ • http://video.google.com/ • http://www.blip.tv/
    37. Local User Groups • http://python.org.tw/ • http://planet.python.org.tw/ • Facebook: Python Taiwan • Google Group: pythontw • OpenFoundry Forums • Hemidemi: python
    38. Anytime, Anywhere IPython Google App Engine http://shell.appspot.com/
    39. Python-based CMS Case Study
    40. Plone … a CMS Built on Zope Written in Python
    41. Blog (CoreBlog)
    42. Portal (CIA, USA)
    43. Portal (NASA, USA)
    44. Network Management (ZenOSS)
    45. Issue Tracker (Poi)
    46. Download Installer • http://plone.org/products/plone
    47. Windows Installer
    48. Windows Installer
    49. Windows Installer
    50. Plone Controller
    51. Filesystem Listing • Python • Zope • Plone • Packages/Products • Software Home • Instance Home
    52. One Database, Many Instances HTTP Requests and Responses port 8080 port 8081 ZEO Client #1 ZEO Client #2 Data.fs Instance #1 Instance #2
    53. Front Page
    54. Zope Management Interface (ZMI)
    55. Site Setup
    56. Guest View
    57. Authenticated View
    58. - Tip for Trying Out Different Browsers for Different Users/Roles One for Admin, Another for Regular User
    59. Usecase #1 Create a New User
    60. Views Available After Login • Personal Bar • Content Views
    61. Usecase #2 Create New Contents (Page)
    62. Default Content Types Page Image News Item File Event Link
    63. Title to ID (Part of the URL) ↓
    64. Visual Editor
    65. Content States
    66. Default State and Workflow
    67. Roles and Permissions View Add Edit Review Manager ✔ ✔ ✔ ✔ Reviewer ✔ ✔ ✔ Member ✔ ✔ ✔ Non-Login ?
    68. Core Security Mapping
    69. Transaction and Undo
    70. Usecase #3 Manage Portlets
    71. Usecase #4 Enable OpenID Support
    72. Usecase #5 Change Theme (to NuPlone)
    73. Free Themes
    74. Better and Super Plone ?
    75. Want More ? Join the Community and Develop !
    76. Starting Points • http://plone.org/documentation • http://marrtw.blogspot.com/2009/04/plone3-books.html
    77. SQL Database Connection Z SQL Z SQL Z SQL Z SQL Z SQL Z SQL Method Method Method Method Method Method MySQL PgSQL ODBC Database Database Database Connection Connection Connection
    78. Database Components HTML WYSWYG Editor Plone DTML Page Template Site Development and Search Interface Script Management Z SQL Method Database Zope Connection MySQLDA PsycopgDA ODBCDA Database Gadfly Adapter MySQL PostgreSQL MSSQL
    79. Designer Friendly Templates • Work with WYSIWYG editors • Zope Page Template (ZPT) – Template Attribute Language (TAL) – Macro Expansion Tag Attribute Language (METAL) XML Namespace TAL statement name body Attribute Attribute Element Name Value Content <title tal:content="here/title">Page Title</title>
    80. Theme Designers ? • AJAX / jQuery Support • KSS = Kinetic Style Sheets • Deliverance • Must Read – Plone 3 Theming
    81. Repeatable Development editing running with buildout.cfg bin/buildout installed as downloading checking into product/ package *.egg Python Package *.tar.gz Index
    82. Build Your Own Project cd c: C:plonepythonScriptspaster create plone3_buildout MyBuildout cd MyBuildout vim buildout.cfg binbuildout.exe
    83. buildout.cfg Sample [buildout] http-address = 8080 eggs = Plone my.package zcml = my.package debug-mode = on
    84. Summary A Comprehensive CMS 通用型的內容管理系統 The Web CMS Report Ideaware Report
    85. Web CMS 2007 Technology Content Production Services Standards Authoring & Transformation Development Aggregation Access Control Repository Services Templating Metadata/Taxonomy Management Page Rendering Globalization Usability Promotion Path Internationalization System Reporting Content Delivery Services Vendor Intangibles Personalization Maintenance & Support Site Search Integration & Tech Partnerships Scaling & Performance Active User Groups Multichannel & Syndication Services & Channel Content Retention Product QA User-Generated Content Strategy & Roadmap Micro-Applications Good Value Site Analytics
    86. Active Community
    87. Multilingual Support
    88. Open Source Projects ArgoUML SchoolTool
    89. Alternative Theming - Deliverance
    90. Developer Baby Steps • Python Script + External Method
    91. Plone Hosting
    92. Thank You ! Question? Email to marr.tw@gmail.com

    + marrmarr, 2 months ago

    custom

    306 views, 1 favs, 0 embeds more stats

    Python - A Comprehensive Programming Language, talk more

    More info about this document

    CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

    Go to text version

    • Total Views 306
      • 306 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 19
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags