Page

More Actions: Raw Text Print View Delete Cache ———————————— Check Spelling Like Pages Local Site Map ———————————— Rename Page Delete Page ———————————— ———————————— Remove Spam Revert to this revision ———————————— SlideShow

User

The Python Wiki

Welcome to the Python Wiki, a user-editable compendium of knowledge based around the Python programming language. Some pages are protected against casual editing - see WikiEditingGuidelines for more information about editing content.

Python is a great object-oriented, interpreted, and interactive programming language. It is often compared (favorably of course Wiki词典 - 图1 ) to Lisp, Tcl, Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java… and it’s much more fun.

Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems. New built-in modules are easily written in C or C++ (or other languages, depending on the chosen implementation). Python is also usable as an extension language for applications written in other languages that need easy-to-use scripting or automation interfaces.
Getting Started Events and Community Software Core Development Using and Editing the Wiki

Getting Started

Beginners Guide Documentation
Links to tutorials, courses and resources Learning materials, topic guides and links to central resources
Beginner Errors Python Books
Some common pitfalls of beginners Books about Python plus reviews
Asking for Help Python Audio Materials
Questions asked by beginners, answered here A mixture of introductory and topical material
Languages Python Implementations
Resources written in languages other than English Different software which runs programs in the Python language
See also the documentation category for all known documentation-related pages.

Events, Courses, Conferences, Community

Python Software

Python Projects Development Tools
Information on finding software projects written in Python, including… Managing your code more effectively
Applications Python Editors
Ready-to-run applications which use Python Editing your code more effectively
Useful Modules Publishing Python Modules
Some building blocks for your own projects (including frameworks for database, GUI, Web programming) How to make others aware of your own works

Python Core Development Tools

The Python Web Site Bug Tracker
Maintaining the official Python online resources Roundup and the code review services used by the Python project
Package Index Other Resources
The infrastructure behind Python package hosting A list of all development process-related resources on this Wiki

Using this Wiki

This Wiki is a community place to gather and organize all things about Python. Feel free to exercise your editorial skills and expertise to make it a useful knowledge base and up-to-date reference on all Python-related topics. There are some guidelines describing the policies and rules governing this Wiki and how you can most effectively contribute to it. A list of site improvements describes various tasks where your help would be appreciated. To keep up with changes on this site, check RecentChanges frequently or follow it using RSS: RSS feed.

Creating a Wiki account

In order to sign up for a wiki account, please go to the Create new account form, enter your account name (using the format FirstnameLastname to avoid issues - please don’t use spaces in the name) and provide a password, plus email address (for password recovery).

Editing pages

Since spamming and vandalism on this wiki had reached a level that required constant intervention, unfamiliar users are no longer allowed to edit pages. However all you need to do is introduce yourself to the wiki admin group to become an editor. If you want to edit a page and have just signed up, or find that you can no longer edit a page that you could edit before, please write to the pydotorg-www mailing list describing what you would like to edit, and we’ll add you to the EditorsGroup. Please include your account name (wiki name) in this message. Sorry for any inconvenience, but we want to keep this wiki a useful tool for the community, while at the same time preventing the wiki admins from burning out cleaning up junk.

Reporting problems

In case of emergency, please contact the python.org maintainers, or if experiencing difficulties, contact the pydotorg-www mailing list to say “help”.

Wiki Attack in January 2013

The wiki was subject to an attack on January 5 2013. Since it was not clear whether user account data was stolen, all passwords were subsequently reset, so you will have to use the password recovery function to get a new password. See the wiki attack description page for more details. If you find problems, please report them to the pydotorg-www mailing list pydotorg-www@python.org.

HTTPS access to the Wiki

We have enabled HTTPS access to the wiki to further enhance security and avoid having to send clear text passwords over the network in order to log in to the wikis.

If you have not been using HTTPS links to the wiki login page, please be advised that your password may have been sniffed on the network at e.g. a conference. It is best to change it and stop using HTTP links to the wiki login page.

FrontPage (last edited 2018-09-16 15:22:36 by SteveHolden)

编写词条

Page

More Actions: Raw Text Print View Delete Cache ———————————— Check Spelling Like Pages Local Site Map ———————————— Rename Page Delete Page ———————————— ———————————— Remove Spam Revert to this revision ———————————— SlideShow

User

Wiki Editing Guidelines

We have these guidelines to keep things relatively organised and easy to find. Generally, when there’s no content on a topic, it’s better to put something in and let others correct it, but make sure to check what other people have written first.

Contents

  1. Wiki Editing Guidelines
    1. Creating an Account
    2. Creating Pages
    3. Editing Protected Pages
    4. Creating a Home Page
    5. Writing Pages
      1. Linking
        1. Broken Links
      2. Attachments
    6. Etiquette

Creating an Account

Before you edit the Wiki you will need to create an account. We ask you to do this so that your contributions can be acknowledged and so that your valuable changes are more easily distinguishable from the spam and vandalism that so often arise when people are not required to provide some kind of identity. Remember that you can always log in via OpenID. When you do so for the first time, you will be asked to enter a username in order to create an account and to associate your OpenID with that account. (If you already have an account, you will be able to enter a username to associate it with that existing account.)

Creating Pages

  • Before adding a new page, check if there isn’t already a page for that topic.
  • By all means choose a WikiName as a page name. Most pages on this Wiki use this style.
  • Do not change the names of things to “force” a WikiName. For example, JEdit is not a WikiName, but this does not mean that you should somehow make it one by changing letters and making, say, JedIt. Instead just create a page and then use the link syntax (for example, [[JEdit]]) to refer to the page.

Editing Protected Pages

  • If you see something that needs to be changed, but you don’t have permission, send a mail to . Unfortunately, any Wiki editable by the general public has to lock down some pages from time to time.

Creating a Home Page

  • If you want to create your own “homepage” on the Wiki, please only do so if you’re providing or promoting Python-related content or if you have signed your name on another page (and want others to be able to contact you).
  • Please use the HomepageTemplate when creating your homepage so that it belongs to CategoryHomepage. (You will be prompted to do this when making a page.)
  • Try to mention something about your relationship to Python on your homepage. Something like, “I maintain the WhoSeeWhatsIt Python wrapper” or, “I offer Python consulting services” would be more than sufficient. If you are just a Python fanboy (or fangirl), something like, “Isn’t Python the greatest language since C?” would also be fine. If all the moderators see is an email address your page is likely to be summarily deleted. We don’t have time to spend searching for your name and/or email elsewhere on the Wiki or in the broader Python community.

Writing Pages

  • Please structure long pages to sections (learn to use == headings ==). Also consider using the <> macro.
  • Avoid duplicating information when not necessary, and respect copyrights. If you are unsure, at least credit the source, so that others can fix things if needed.
  • Learn to use Wiki format mentioned in HelpOnFormatting. It allows for more consistent page styles.
  • You can use ReStructured Text mark-up, but this can be confusing to people, so try not to do this too much. Importing content from somewhere else for initial publication is probably the most excusable exception. Some features like category membership may not work for ReST pages, so consider converting ReST content to Wiki format at some point.
  • If you have source code included, run it yourself to test for at least simple errors.
  • Take advantage of this Wiki’s ability to format and colour Python source code - it is easier to read than a simple, plain monochrome section. An example:

Toggle line numbers

  1. 1 from hello import world
  2. 2
  3. 3 def say_hello():
  4. 4 """Just say hello :)"""
  5. 5 what = world()
  6. 6 message = what.greet() # no, there's no module named "hello"
  7. 7 # in Python stdlib - at least not yet :)
  8. 8 return message
  9. 9
  10. 10 if __name__ == "__main__":
  11. 11 say_hello()
Use numbers=disable after the language declaration (such as #!python) to remove line numbering.

Linking

  • Although a WikiName will link to another page, don’t be afraid of using the link syntax to link to, say, the FrontPage by writing [[FrontPage|front page]] instead, thus producing a link to the front page like this.
  • Use the Issue:7942 syntax to refer to issues in the Python bug tracker. For example, here is an issue: 7942.
  • Use the PEP:0001 syntax to refer to PEPs. For example, here is a PEP: 0001.
  • If a link is broken on a page, try to determine whether it is temporarily broken or whether the resource really has gone away forever. For permanently broken links, follow the instructions below.
  • Do not use link shortening services for links! You are not limited to 160 characters (or whatever) here, and there is no benefit to using a shortened URL that has to be redirected by some third-party service to take the user to the real URL. Using shortened links exposes users to potentially dubious redirection sites and also obscures the nature of the eventual URL which may also be a dubious site itself. Moreover, obscuring the real URL makes decisions about updating links and archiving content much harder.

Broken Links

  • If the link pointed to a specific resource for which a substitute does not really exist, try putting the URL into the Web Archive, finding the latest usable version, and then replacing the link in the page with that version or a link to the choice of versions that the Web Archive provides. You might want to add something like “(archived link)” to show that the resource is no longer “live”.
  • If the link pointed to a resource that has moved - perhaps it was maintained by one company but is now maintained by another - you might update it to point to the new home of that resource.
  • If the link referred to a description of a topic, consider using Wikipedia or another stable, well-known resource as a replacement. For example, a replacement for a link to a definition of Python could be [[WikiPedia:Python (programming language)]] producing Python (programming language) and would probably serve the intended purpose.

Attachments

  • Do not upload attachments without referencing them in the page they are attached to (or in some other obviously connected page). Unclaimed attachments will be deleted!

Etiquette

When editing existing pages, the following guidelines are proposed:
  • By all means make edits to pages in order to fix mistakes, update and add information, and so on.
  • Use the preview button before committing.
  • When editing pages, particularly larger ones, try and commit all changes at once, or at least as many as possible at the same time. Don’t make lots of small changes, saving each one: this fills the page history with micro-edits which make it very difficult to see earlier history information.
  • Remember that some pages have been around for a long time, are actively maintained, and are the result of collaboration between a number of people. It is therefore quite impolite to go in and to spontaneously reorganise such pages or to decide that your own editorial preferences overrule those of the people who have worked hard to produce the information you want to change, remove or rearrange. Consider contacting one or more of the maintainers before seeking to “refactor” content.
  • Respect any editorial guidelines on the pages you wish to edit. Do not remove guidelines you do not agree with!

CategoryPythonWebsite