Python-Ref > Accessing the Internet > Downloading things > Downloading a file to the disk
 
 

<-^^->

Downloading a file to the disk

Expand/Shrink
Zdroj: (download3-1.py)
  1   import urllib2   # library for accessing the web
  2   
  3   def downloadURL( url):
  4       try:
  5           f = urllib2.urlopen( url)   # try to open the URL for reading
  6       except urllib2.URLError:        # if an error occurs...
  7           return ""                   # ...the page is not available, return ""
  8   
  9       # the code below will be executed only if the URL was successfully opened
 10       text = f.read()
 11       f.close()                       # close the connection
 12       return text
 13   
 14   
 15   text = downloadURL( "http://python.org")
 16   f = file( "python.html", "w")
 17   f.write( text)
 18   f.close()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Python Programming Language -- Official Website</title>
  <meta name="keywords" content="python programming language object oriented web free source" />
  <meta name="description" content="      Home page for Python, an interpreted, interactive, object-oriented, extensible
      programming language. It provides an extraordinary combination of clarity and
      versatility, and is free and comprehensively ported." />
  <link rel="alternate" type="application/rss+xml" title="Community Events"
        href="http://www.python.org/channews.rdf" />
  <link rel="alternate" type="application/rss+xml" title="Python Recipes"
        href="http://aspn.activestate.com/ASPN/Cookbook/Python/index_rss" />
  <link rel="alternate" type="application/rss+xml" title="Usergroup News"
        href="http://python-groups.blogspot.com/feeds/posts/default" />
  <link rel="alternate" type="application/rss+xml" title="Python Screencasts"
        href="http://www.showmedo.com/latestVideoFeed/rss2.0?tag=python" />
  <link rel="alternate" type="application/rss+xml" title="Python Podcasts"
        href="http://www.awaretek.com/python/index.xml" />
  <link rel="alternate" type="application/rss+xml" title="Foundation News"
        href="http://pyfound.blogspot.com/feeds/posts/default" />
  <link rel="alternate" type="application/rss+xml" title="Python Enhancement Proposals"
        href="http://www.python.org/dev/peps/peps.rss" />
  <link rel="stylesheet" type="text/css" media="screen" id="screen-switcher-stylesheet"
        href="/styles/screen-switcher-default.css" />
  <link rel="stylesheet" type="text/css" media="sc&#82;een"
        href="/styles/netscape4.css" />
  <link rel="stylesheet" type="text/css" media="print"
        href="/styles/print.css" />
  <link rel="alternate stylesheet" type="text/css" media="screen"
        href="/styles/largestyles.css" title="large text" />
  <link rel="alternate stylesheet" type="text/css" media="screen"
        href="/styles/defaultfonts.css" title="default fonts" />

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search under the www.python.org Domain"
        href="/search-pysite.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search within the Python Wiki"
        href="/search-pywiki.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search within Python Books at Google Book Search"
        href="/search-pybooks.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search within the Python Documentation"
        href="/search-pydocs.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search for a Module in the Standard Library"
        href="/search-pymodules.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search for Packages inside the Cheeseshop (PyPI)"
        href="/search-pycheese.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search Archives of the Main Python Mailing List"
        href="/search-pythonlist.xml"/>

  <script type="text/javascript" src="/js/iotbs2-key-directors-load.js"></script>
  <script type="text/javascript" src="/js/iotbs2-directors.js"></script>
  <script type="text/javascript" src="/js/iotbs2-core.js"></script>

</head>


<body>
  <!-- Logo -->
  <h1 id="logoheader">
    <a href="/" id="logolink" accesskey="1"><img id="logo" src="/images/python-logo.gif" alt="homepage" border="0" /></a>
  </h1>
  <!-- Skip to Navigation -->
  <div class="skiptonav"><a href="#left-hand-navigation" accesskey="2"><img src="/images/trans.gif" id="skiptonav" alt="skip to navigation" border="0" /></a></div>
  <div class="skiptonav"><a href="#content-body" accesskey="3"><img src="/images/trans.gif" id="skiptocontent" alt="skip to content" border="0" /></a></div>
  <!-- Utility Menu -->
  <div id="utility-menu">
    <!-- Search Box -->
    <div id="searchbox">
      <form method="get" action="http://google.com/search" id="searchform" name="searchform">
        <div id="search">
          <input type="hidden" id="domains" name="domains" value="www.python.org" />
          <input type="hidden" id="sitesearch" name="sitesearch" value="www.python.org" />
          <input type="hidden" id="sourceid" name="sourceid" value="google-search" />
          <input type="text" class="input-text" name="q" id="q" />
          <input type="submit" value="search" class="input-button" name="submit" id="submit" />
          <a href="/search" class="reference">Advanced Search</a>
        </div>
      </form>
    </div>
    <div id="screen-switcher"></div>
  </div>

  <div id="left-hand-navigation">
    <!-- Main Menu -->
    <div id="menu">
      <ul class="level-one">
            <li>
          <a href="/about/" title="About The Python Language">About</a>
        </li>
            <li>
          <a href="/news/" title="Major Happenings Within the Python Community">News</a>
        </li>
            <li>
          <a href="/doc/" title="Tutorials, Library Reference, C API">Documentation</a>
        </li>
            <li>
          <a href="/download/" title="Start Running Python Under Windows, Mac, Linux and Others">Download</a>
        </li>
            <li>
          <a href="/community/" title="Mailing Lists, Jobs, Conferences, SIGs, Online Chats">Community</a>
        </li>
            <li>
          <a href="/psf/" title="Python Software Foundation">Foundation</a>
        </li>
            <li>
          <a href="/dev/" title="Development of the Python language and website">Core Development</a>
        </li>
            <li>
          <a href="/links/" title="Pointers to Useful Information">Links</a>
        </li>
      </ul>
    </div>

    <!-- Quick Links -->
      <h4><a href="/download/releases/2.5.2">Quick Links (2.5.2)</a></h4>

	<ul class="quicklinks">
	  <li><a href="http://docs.python.org/" title="Manuals for Latest Stable Release">Documentation</a></li>
	  <li><a href="/ftp/python/2.5.2/python-2.5.2.msi" title="Easy Installer of Python under Windows">Windows Installer</a></li>
	  <li><a href="/ftp/python/2.5.2/Python-2.5.2.tar.bz2" title="Grab the Source for the Latest Stable Release">Source Distribution</a></li>
	  <li><a href="http://pypi.python.org/pypi" title="Community Collection of Shared Python Modules">Package Index</a></li>
	</ul>
      <h4><a href="/community/jobs" title="Employers and Job Openings">Python Jobs</a></h4>

      <h4><a href="/psf/donations/" title="Support the Python Software Foundation">Donate to the PSF</a></h4>

      <h4><a href="http://wiki.python.org/moin/PythonWebsiteCreatingNewTickets" title="Submission System for Problems/Suggestions with the Website">Report website bug</a></h4>

  </div>

  <div id="content-body">
    <div id="body-main">
      <div id="content">
        

        <h1 class="pageheading">Python Programming Language -- Official Website</h1>
	<div id="homepage-boxes">
          <div class="homepage-box success">
            <h4>NASA uses Python...</h4>
            <a href="/about/success/usa">
              <img class="success" alt="success story photo" 
                src="/images/success/nasa.jpg" /></a>
	      <p>... so does <a class="reference" href="about/success/rackspace">Rackspace</a>,
	      <a class="reference" href="about/success/ilm">Industrial Light and Magic</a>,
	      <a class="reference" href="about/success/astra">AstraZeneca</a>,
	      <a class="reference" href="about/success/honeywell">Honeywell</a>,
	      <a class="reference" href="about/success">and many others</a>.</p>
          </div>

          
	    <div id="quote" class="homepage-box">
	      
	      <h4>What they are saying...</h4>
	      <div>
                <b>Industrial Light & Magic:</b><br />
                <!--utf-8--><!--0.4--><p>"Python is everywhere at ILM. It's used to extend the capabilities
of our applications, as well as providing the glue between them. Every
CG image we create has involved Python somewhere in the process," said
Philip Peterson, Principal Engineer, Research &amp; Development, <a class="reference" href="http://www.ilm.com">Industrial Light &amp; Magic</a>.</p>
              </div>
	      <a href="/about/quotes" class="more" title="more quotes">more...</a>      
	    </div>

	  <div class="homepage-box">
	    <h4>Using Python For...</h4>
	    <ul>
		<li class="group"><a href="http://wiki.python.org/moin/WebProgramming">Web Programming</a></li>
		  <li>
		    <a href="http://wiki.python.org/moin/CgiScripts">CGI</a>, 
		    <a href="http://www.zope.org/">Zope</a>, 
		    <a href="http://www.djangoproject.com/">Django</a>, 
		    <a href="http://www.turbogears.org/">TurboGears</a>, 
		  
		  <a href="http://wiki.python.org/moin/PythonXml">XML</a>
		  </li>
		<li class="group"><a href="http://wiki.python.org/moin/DatabaseProgramming/">Databases</a></li>
		  <li>
		    <a href="http://www.egenix.com/files/python/mxODBC.html">ODBC</a>, 
		  
		  <a href="http://sourceforge.net/projects/mysql-python">MySQL</a>
		  </li>
		<li class="group"><a href="http://wiki.python.org/moin/GuiProgramming">GUI Development</a></li>
		  <li>
		    <a href="http://wiki.python.org/moin/WxPython">wxPython</a>, 
		    <a href="http://wiki.python.org/moin/TkInter">tkInter</a>, 
		    <a href="http://wiki.python.org/moin/PyGtk">PyGtk</a>, 
		  
		  <a href="http://wiki.python.org/moin/PyQt">PyQt</a>
		  </li>
		<li class="group"><a href="http://wiki.python.org/moin/NumericAndScientific">Scientific and Numeric</a></li>
		  <li>
		    <a href="http://www.pasteur.fr/recherche/unites/sis/formation/python/index.html">Bioinformatics</a>, 
		  
		  <a href="http://www.pentangle.net/python/handbook/">Physics</a>
		  </li>
		<li class="group"><a href="/community/sigs/current/edu-sig">Education</a></li>
		  <li>
		    <a href="http://www.openbookproject.net/pybiblio/">pyBiblio</a>, 
		  
		  <a href="http://osl.iu.edu/~lums/swc/">Software Carpentry Course</a>
		  </li>
		<li class="group"><a href="/about/apps">Networking</a></li>
		  <li>
		    <a href="http://docs.python.org/dev/howto/sockets.html">Sockets</a>, 
		  
		  <a href="http://twistedmatrix.com/trac/">Twisted</a>
		  </li>
		<li class="group"><a href="/about/apps">Software Development</a></li>
		  <li>
		    <a href="http://buildbot.net/trac">Buildbot</a>, 
		    <a href="http://www.edgewall.com/trac/">Trac</a>, 
		    <a href="http://roundup.sourceforge.net/">Roundup</a>, 
		  
		  <a href="http://wiki.python.org/moin/IntegratedDevelopmentEnvironments">IDEs</a>
		  </li>
		<li class="group"><a href="/about/apps">Game Development</a></li>
		  <li>
		    <a href="http://www.pygame.org/news.html">PyGame</a>, 
		    <a href="http://www.alobbs.com/pykyra">PyKyra</a>, 
		  
		  <a href="http://www.vrplumber.com/py3d.py">3D Rendering</a>
		  </li>
	    </ul>
	    <a href="/about/apps" class="more">more...</a>      
	  </div>
	</div>

        <div id="intro">
          



        <!--utf-8--><!--0.4.1--><p><strong>Python is a dynamic object-oriented programming language that can be
used for many kinds of software development. It offers strong support
for integration with other languages and tools, comes with extensive
standard libraries, and can be learned in a few days. Many Python
programmers report substantial productivity gains and feel the language
encourages the development of higher quality, more maintainable code.</strong></p>
<p>Python runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm
Handhelds, and Nokia mobile phones. Python has also been ported to the
Java and .NET virtual machines.</p>
<p>Python is distributed under an OSI-approved <a class="reference" href="/psf/license">open source license</a> that makes it free to use, even for commercial
products.</p>
<p>The <a class="reference" href="/psf">Python Software Foundation (PSF)</a> holds and protects the
intellectual property rights behind Python, underwrites the <a class="reference" href="http://pycon.org/">PyCon
conference</a>, and funds grants and other projects
in the Python community.</p>
<p><a class="reference" href="/about">Read more</a> -or- <a class="reference" href="/download">try Python now</a></p>


        </div>

        <div class="content-section">
            <div id="newsindex" class="news-section">
	      
		<h2 class="news">S3 Call for Participation</h2>
		  <!--utf-8--><!--0.4.1--><p>The <a class="reference" href="http://www.swa.hpi.uni-potsdam.de/s3/">Workshop on Self-sustaining Systems (S3) 2008</a> will be held in Potsdam, Germany on May 14-16, 2008.  The program and registration information are now available online.</p>
		<div class="pubdate">Published: Wed, 16 Apr 2008 09:00 +0200</div>
		<h2 class="news">EuroSciPy Call for Participation</h2>
		  <!--utf-8--><!--0.4.1--><p>The <a class="reference" href="http://www.scipy.org/EuroSciPy2008">EuroSciPy 2008 Conference</a> will be held in Leipzig, Germany on July 26-27, 2008.  <a class="reference" href="http://mail.python.org/pipermail/python-announce-list/2008-April/006536.html">The Call for Participation is up</a>, and <a class="reference" href="http://www.python-academy.com/euroscipy/registration.html">registration is open</a>.</p>
		<div class="pubdate">Published: Thu, 10 Apr 2008 17:00 -0400</div>
		<h2 class="news">EuroPython 2008 Call for Participation</h2>
		  <!--utf-8--><!--0.4.1--><p><a class="reference" href="http://www.europython.org/">EuroPython 2008</a> will take place in Vilnius, Lithuania from 7th July until 12th July (including sprints). Proposals for talks and activities are now <a class="reference" href="http://www.europython.org/community/CallForParticipation">welcome</a>!</p>
		<div class="pubdate">Published: Wed, 9 Apr 2008 21:00 -0400</div>
		<h2 class="news">PSF Community Awards</h2>
		  <!--utf-8--><!--0.4.1--><p>The first <a class="reference" href="/community/awards/psf-awards/">Python Software Foundation Community Awards</a> were announced at <a class="reference" href="http://us.pycon.org/2008/">PyCon 2008</a> and on the <a class="reference" href="http://pyfound.blogspot.com/2008/03/psf-community-awards.html">PSF Blog</a>.  Congratulations to <strong>Matthew Dixon Cowles</strong>, <strong>Brad Knowles</strong>, <strong>Peter Kropf</strong>, and <strong>Martin Thomas</strong>, and many thanks for their contributions to the Python community!</p>
		<div class="pubdate">Published: Fri, 4 Apr 2008 09:00 -0400</div>
		<h2 class="news">Python 2.6alpha2 and 3.0alpha4 released</h2>
		  <!--utf-8--><!--0.4.1--><p>The <a class="reference" href="/download/releases/2.6/">second alpha release of Python 2.6</a> and the <a class="reference" href="/download/releases/3.0/">fourth alpha release of Python 3.0</a> are now available.</p>
		<div class="pubdate">Published: Wed, 2 Apr 2008 18:00 -0500</div>
		<h2 class="news">PyCon FR Call for Proposals</h2>
		  <!--utf-8--><!--0.4.1--><p><a class="reference" href="http://fr.pycon.org">PyCon Fr - Journées Python</a> will take place in Paris, France on May 17-18, 2008. It's not too late for <a class="reference" href="http://fr.pycon.org/actualites/appel-a-propositions">new proposals</a>!</p>
		<div class="pubdate">Published: Mon, 24 Mar 2008 19:44 -0300</div>
		<h2 class="news">PyCon Italia Call for Proposals</h2>
		  <!--utf-8--><!--0.4.1--><p>PyCon Italia is happening May 9-11, 2008 in Firenze -- see the <a class="reference" href="http://www.pycon.it/pycon2/cfp-en">Call for Papers</a>.</p>
		<div class="pubdate">Published: Tue, 11 Mar 2008 20:14 +0400</div>
	      [ <a href="/channews.rdf">RSS</a> ]
             </div>
        </div>

      </div>

      
      <div id="footer">
	<div id="credits">
 	  <a href="/about/website">Website maintained by the Python community</a><br/>
	  <a href="http://www.xs4all.com/" title="Web and email hosting provided by xs4all, Netherlands">hosting by xs4all</a> /
	  <a href="http://www.pollenation.net/" title="Design and content management system by Pollenation Internet, Yorkshire">design by pollenation</a>
	</div>
	Copyright &copy; 1990-2008, <a href='/psf'>Python Software Foundation</a><br/>
	<a href="/about/legal">Legal Statements</a>
      </div>


    </div>
  </div>
</body>
</html>






Doba běhu: 229.9 ms
Expand/Shrink
Zdroj: (download3-2.py)
  1   import urllib2   # library for accessing the web
  2   
  3   def downloadURL( url, filename):
  4       try:
  5           f = urllib2.urlopen( url)   # try to open the URL for reading
  6       except urllib2.URLError:        # if an error occurs...
  7           return False                # ...the page is not available, return False
  8   
  9       # the code below will be executed only if the URL was successfully opened
 10       outf = file( filename, "w")    # open a new file
 11       outf.write( f.read())          # read it from 'f' and write to 'outf'
 12       f.close()                      # close the URL
 13       outf.close()                   # close the outfile
 14       return True
 15   
 16   
 17   if downloadURL( "http://python.org", "python.html"):
 18       print "Downloaded"
 19   else:
 20       print "Not available"
stdout:
Downloaded
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Python Programming Language -- Official Website</title>
  <meta name="keywords" content="python programming language object oriented web free source" />
  <meta name="description" content="      Home page for Python, an interpreted, interactive, object-oriented, extensible
      programming language. It provides an extraordinary combination of clarity and
      versatility, and is free and comprehensively ported." />
  <link rel="alternate" type="application/rss+xml" title="Community Events"
        href="http://www.python.org/channews.rdf" />
  <link rel="alternate" type="application/rss+xml" title="Python Recipes"
        href="http://aspn.activestate.com/ASPN/Cookbook/Python/index_rss" />
  <link rel="alternate" type="application/rss+xml" title="Usergroup News"
        href="http://python-groups.blogspot.com/feeds/posts/default" />
  <link rel="alternate" type="application/rss+xml" title="Python Screencasts"
        href="http://www.showmedo.com/latestVideoFeed/rss2.0?tag=python" />
  <link rel="alternate" type="application/rss+xml" title="Python Podcasts"
        href="http://www.awaretek.com/python/index.xml" />
  <link rel="alternate" type="application/rss+xml" title="Foundation News"
        href="http://pyfound.blogspot.com/feeds/posts/default" />
  <link rel="alternate" type="application/rss+xml" title="Python Enhancement Proposals"
        href="http://www.python.org/dev/peps/peps.rss" />
  <link rel="stylesheet" type="text/css" media="screen" id="screen-switcher-stylesheet"
        href="/styles/screen-switcher-default.css" />
  <link rel="stylesheet" type="text/css" media="sc&#82;een"
        href="/styles/netscape4.css" />
  <link rel="stylesheet" type="text/css" media="print"
        href="/styles/print.css" />
  <link rel="alternate stylesheet" type="text/css" media="screen"
        href="/styles/largestyles.css" title="large text" />
  <link rel="alternate stylesheet" type="text/css" media="screen"
        href="/styles/defaultfonts.css" title="default fonts" />

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search under the www.python.org Domain"
        href="/search-pysite.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search within the Python Wiki"
        href="/search-pywiki.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search within Python Books at Google Book Search"
        href="/search-pybooks.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search within the Python Documentation"
        href="/search-pydocs.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search for a Module in the Standard Library"
        href="/search-pymodules.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search for Packages inside the Cheeseshop (PyPI)"
        href="/search-pycheese.xml"/>

  <link rel="search" type="application/opensearchdescription+xml"
        title="Search Archives of the Main Python Mailing List"
        href="/search-pythonlist.xml"/>

  <script type="text/javascript" src="/js/iotbs2-key-directors-load.js"></script>
  <script type="text/javascript" src="/js/iotbs2-directors.js"></script>
  <script type="text/javascript" src="/js/iotbs2-core.js"></script>

</head>


<body>
  <!-- Logo -->
  <h1 id="logoheader">
    <a href="/" id="logolink" accesskey="1"><img id="logo" src="/images/python-logo.gif" alt="homepage" border="0" /></a>
  </h1>
  <!-- Skip to Navigation -->
  <div class="skiptonav"><a href="#left-hand-navigation" accesskey="2"><img src="/images/trans.gif" id="skiptonav" alt="skip to navigation" border="0" /></a></div>
  <div class="skiptonav"><a href="#content-body" accesskey="3"><img src="/images/trans.gif" id="skiptocontent" alt="skip to content" border="0" /></a></div>
  <!-- Utility Menu -->
  <div id="utility-menu">
    <!-- Search Box -->
    <div id="searchbox">
      <form method="get" action="http://google.com/search" id="searchform" name="searchform">
        <div id="search">
          <input type="hidden" id="domains" name="domains" value="www.python.org" />
          <input type="hidden" id="sitesearch" name="sitesearch" value="www.python.org" />
          <input type="hidden" id="sourceid" name="sourceid" value="google-search" />
          <input type="text" class="input-text" name="q" id="q" />
          <input type="submit" value="search" class="input-button" name="submit" id="submit" />
          <a href="/search" class="reference">Advanced Search</a>
        </div>
      </form>
    </div>
    <div id="screen-switcher"></div>
  </div>

  <div id="left-hand-navigation">
    <!-- Main Menu -->
    <div id="menu">
      <ul class="level-one">
            <li>
          <a href="/about/" title="About The Python Language">About</a>
        </li>
            <li>
          <a href="/news/" title="Major Happenings Within the Python Community">News</a>
        </li>
            <li>
          <a href="/doc/" title="Tutorials, Library Reference, C API">Documentation</a>
        </li>
            <li>
          <a href="/download/" title="Start Running Python Under Windows, Mac, Linux and Others">Download</a>
        </li>
            <li>
          <a href="/community/" title="Mailing Lists, Jobs, Conferences, SIGs, Online Chats">Community</a>
        </li>
            <li>
          <a href="/psf/" title="Python Software Foundation">Foundation</a>
        </li>
            <li>
          <a href="/dev/" title="Development of the Python language and website">Core Development</a>
        </li>
            <li>
          <a href="/links/" title="Pointers to Useful Information">Links</a>
        </li>
      </ul>
    </div>

    <!-- Quick Links -->
      <h4><a href="/download/releases/2.5.2">Quick Links (2.5.2)</a></h4>

	<ul class="quicklinks">
	  <li><a href="http://docs.python.org/" title="Manuals for Latest Stable Release">Documentation</a></li>
	  <li><a href="/ftp/python/2.5.2/python-2.5.2.msi" title="Easy Installer of Python under Windows">Windows Installer</a></li>
	  <li><a href="/ftp/python/2.5.2/Python-2.5.2.tar.bz2" title="Grab the Source for the Latest Stable Release">Source Distribution</a></li>
	  <li><a href="http://pypi.python.org/pypi" title="Community Collection of Shared Python Modules">Package Index</a></li>
	</ul>
      <h4><a href="/community/jobs" title="Employers and Job Openings">Python Jobs</a></h4>

      <h4><a href="/psf/donations/" title="Support the Python Software Foundation">Donate to the PSF</a></h4>

      <h4><a href="http://wiki.python.org/moin/PythonWebsiteCreatingNewTickets" title="Submission System for Problems/Suggestions with the Website">Report website bug</a></h4>

  </div>

  <div id="content-body">
    <div id="body-main">
      <div id="content">
        

        <h1 class="pageheading">Python Programming Language -- Official Website</h1>
	<div id="homepage-boxes">
          <div class="homepage-box success">
            <h4>NASA uses Python...</h4>
            <a href="/about/success/usa">
              <img class="success" alt="success story photo" 
                src="/images/success/nasa.jpg" /></a>
	      <p>... so does <a class="reference" href="about/success/rackspace">Rackspace</a>,
	      <a class="reference" href="about/success/ilm">Industrial Light and Magic</a>,
	      <a class="reference" href="about/success/astra">AstraZeneca</a>,
	      <a class="reference" href="about/success/honeywell">Honeywell</a>,
	      <a class="reference" href="about/success">and many others</a>.</p>
          </div>

          
	    <div id="quote" class="homepage-box">
	      
	      <h4>What they are saying...</h4>
	      <div>
                <b>Industrial Light & Magic:</b><br />
                <!--utf-8--><!--0.4--><p>"Python is everywhere at ILM. It's used to extend the capabilities
of our applications, as well as providing the glue between them. Every
CG image we create has involved Python somewhere in the process," said
Philip Peterson, Principal Engineer, Research &amp; Development, <a class="reference" href="http://www.ilm.com">Industrial Light &amp; Magic</a>.</p>
              </div>
	      <a href="/about/quotes" class="more" title="more quotes">more...</a>      
	    </div>

	  <div class="homepage-box">
	    <h4>Using Python For...</h4>
	    <ul>
		<li class="group"><a href="http://wiki.python.org/moin/WebProgramming">Web Programming</a></li>
		  <li>
		    <a href="http://wiki.python.org/moin/CgiScripts">CGI</a>, 
		    <a href="http://www.zope.org/">Zope</a>, 
		    <a href="http://www.djangoproject.com/">Django</a>, 
		    <a href="http://www.turbogears.org/">TurboGears</a>, 
		  
		  <a href="http://wiki.python.org/moin/PythonXml">XML</a>
		  </li>
		<li class="group"><a href="http://wiki.python.org/moin/DatabaseProgramming/">Databases</a></li>
		  <li>
		    <a href="http://www.egenix.com/files/python/mxODBC.html">ODBC</a>, 
		  
		  <a href="http://sourceforge.net/projects/mysql-python">MySQL</a>
		  </li>
		<li class="group"><a href="http://wiki.python.org/moin/GuiProgramming">GUI Development</a></li>
		  <li>
		    <a href="http://wiki.python.org/moin/WxPython">wxPython</a>, 
		    <a href="http://wiki.python.org/moin/TkInter">tkInter</a>, 
		    <a href="http://wiki.python.org/moin/PyGtk">PyGtk</a>, 
		  
		  <a href="http://wiki.python.org/moin/PyQt">PyQt</a>
		  </li>
		<li class="group"><a href="http://wiki.python.org/moin/NumericAndScientific">Scientific and Numeric</a></li>
		  <li>
		    <a href="http://www.pasteur.fr/recherche/unites/sis/formation/python/index.html">Bioinformatics</a>, 
		  
		  <a href="http://www.pentangle.net/python/handbook/">Physics</a>
		  </li>
		<li class="group"><a href="/community/sigs/current/edu-sig">Education</a></li>
		  <li>
		    <a href="http://www.openbookproject.net/pybiblio/">pyBiblio</a>, 
		  
		  <a href="http://osl.iu.edu/~lums/swc/">Software Carpentry Course</a>
		  </li>
		<li class="group"><a href="/about/apps">Networking</a></li>
		  <li>
		    <a href="http://docs.python.org/dev/howto/sockets.html">Sockets</a>, 
		  
		  <a href="http://twistedmatrix.com/trac/">Twisted</a>
		  </li>
		<li class="group"><a href="/about/apps">Software Development</a></li>
		  <li>
		    <a href="http://buildbot.net/trac">Buildbot</a>, 
		    <a href="http://www.edgewall.com/trac/">Trac</a>, 
		    <a href="http://roundup.sourceforge.net/">Roundup</a>, 
		  
		  <a href="http://wiki.python.org/moin/IntegratedDevelopmentEnvironments">IDEs</a>
		  </li>
		<li class="group"><a href="/about/apps">Game Development</a></li>
		  <li>
		    <a href="http://www.pygame.org/news.html">PyGame</a>, 
		    <a href="http://www.alobbs.com/pykyra">PyKyra</a>, 
		  
		  <a href="http://www.vrplumber.com/py3d.py">3D Rendering</a>
		  </li>
	    </ul>
	    <a href="/about/apps" class="more">more...</a>      
	  </div>
	</div>

        <div id="intro">
          



        <!--utf-8--><!--0.4.1--><p><strong>Python is a dynamic object-oriented programming language that can be
used for many kinds of software development. It offers strong support
for integration with other languages and tools, comes with extensive
standard libraries, and can be learned in a few days. Many Python
programmers report substantial productivity gains and feel the language
encourages the development of higher quality, more maintainable code.</strong></p>
<p>Python runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm
Handhelds, and Nokia mobile phones. Python has also been ported to the
Java and .NET virtual machines.</p>
<p>Python is distributed under an OSI-approved <a class="reference" href="/psf/license">open source license</a> that makes it free to use, even for commercial
products.</p>
<p>The <a class="reference" href="/psf">Python Software Foundation (PSF)</a> holds and protects the
intellectual property rights behind Python, underwrites the <a class="reference" href="http://pycon.org/">PyCon
conference</a>, and funds grants and other projects
in the Python community.</p>
<p><a class="reference" href="/about">Read more</a> -or- <a class="reference" href="/download">try Python now</a></p>


        </div>

        <div class="content-section">
            <div id="newsindex" class="news-section">
	      
		<h2 class="news">S3 Call for Participation</h2>
		  <!--utf-8--><!--0.4.1--><p>The <a class="reference" href="http://www.swa.hpi.uni-potsdam.de/s3/">Workshop on Self-sustaining Systems (S3) 2008</a> will be held in Potsdam, Germany on May 14-16, 2008.  The program and registration information are now available online.</p>
		<div class="pubdate">Published: Wed, 16 Apr 2008 09:00 +0200</div>
		<h2 class="news">EuroSciPy Call for Participation</h2>
		  <!--utf-8--><!--0.4.1--><p>The <a class="reference" href="http://www.scipy.org/EuroSciPy2008">EuroSciPy 2008 Conference</a> will be held in Leipzig, Germany on July 26-27, 2008.  <a class="reference" href="http://mail.python.org/pipermail/python-announce-list/2008-April/006536.html">The Call for Participation is up</a>, and <a class="reference" href="http://www.python-academy.com/euroscipy/registration.html">registration is open</a>.</p>
		<div class="pubdate">Published: Thu, 10 Apr 2008 17:00 -0400</div>
		<h2 class="news">EuroPython 2008 Call for Participation</h2>
		  <!--utf-8--><!--0.4.1--><p><a class="reference" href="http://www.europython.org/">EuroPython 2008</a> will take place in Vilnius, Lithuania from 7th July until 12th July (including sprints). Proposals for talks and activities are now <a class="reference" href="http://www.europython.org/community/CallForParticipation">welcome</a>!</p>
		<div class="pubdate">Published: Wed, 9 Apr 2008 21:00 -0400</div>
		<h2 class="news">PSF Community Awards</h2>
		  <!--utf-8--><!--0.4.1--><p>The first <a class="reference" href="/community/awards/psf-awards/">Python Software Foundation Community Awards</a> were announced at <a class="reference" href="http://us.pycon.org/2008/">PyCon 2008</a> and on the <a class="reference" href="http://pyfound.blogspot.com/2008/03/psf-community-awards.html">PSF Blog</a>.  Congratulations to <strong>Matthew Dixon Cowles</strong>, <strong>Brad Knowles</strong>, <strong>Peter Kropf</strong>, and <strong>Martin Thomas</strong>, and many thanks for their contributions to the Python community!</p>
		<div class="pubdate">Published: Fri, 4 Apr 2008 09:00 -0400</div>
		<h2 class="news">Python 2.6alpha2 and 3.0alpha4 released</h2>
		  <!--utf-8--><!--0.4.1--><p>The <a class="reference" href="/download/releases/2.6/">second alpha release of Python 2.6</a> and the <a class="reference" href="/download/releases/3.0/">fourth alpha release of Python 3.0</a> are now available.</p>
		<div class="pubdate">Published: Wed, 2 Apr 2008 18:00 -0500</div>
		<h2 class="news">PyCon FR Call for Proposals</h2>
		  <!--utf-8--><!--0.4.1--><p><a class="reference" href="http://fr.pycon.org">PyCon Fr - Journées Python</a> will take place in Paris, France on May 17-18, 2008. It's not too late for <a class="reference" href="http://fr.pycon.org/actualites/appel-a-propositions">new proposals</a>!</p>
		<div class="pubdate">Published: Mon, 24 Mar 2008 19:44 -0300</div>
		<h2 class="news">PyCon Italia Call for Proposals</h2>
		  <!--utf-8--><!--0.4.1--><p>PyCon Italia is happening May 9-11, 2008 in Firenze -- see the <a class="reference" href="http://www.pycon.it/pycon2/cfp-en">Call for Papers</a>.</p>
		<div class="pubdate">Published: Tue, 11 Mar 2008 20:14 +0400</div>
	      [ <a href="/channews.rdf">RSS</a> ]
             </div>
        </div>

      </div>

      
      <div id="footer">
	<div id="credits">
 	  <a href="/about/website">Website maintained by the Python community</a><br/>
	  <a href="http://www.xs4all.com/" title="Web and email hosting provided by xs4all, Netherlands">hosting by xs4all</a> /
	  <a href="http://www.pollenation.net/" title="Design and content management system by Pollenation Internet, Yorkshire">design by pollenation</a>
	</div>
	Copyright &copy; 1990-2008, <a href='/psf'>Python Software Foundation</a><br/>
	<a href="/about/legal">Legal Statements</a>
      </div>


    </div>
  </div>
</body>
</html>






Doba běhu: 215.9 ms