Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
c458e945
Kaydet (Commit)
c458e945
authored
Eyl 11, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rewrite sections on GUI and DOS/Windows, various other small edits,
added 1996 copyright, $Revision$.
üst
6e8ec59e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
122 deletions
+106
-122
FAQ
Misc/FAQ
+106
-122
No files found.
Misc/FAQ
Dosyayı görüntüle @
c458e945
...
@@ -3,20 +3,20 @@ Newsgroups: comp.lang.python,comp.answers,news.answers
...
@@ -3,20 +3,20 @@ Newsgroups: comp.lang.python,comp.answers,news.answers
Followup-to: comp.lang.python
Followup-to: comp.lang.python
From: guido@cnri.reston.va.us (Guido van Rossum)
From: guido@cnri.reston.va.us (Guido van Rossum)
Reply-to: guido@cnri.reston.va.us (Guido van Rossum)
Reply-to: guido@cnri.reston.va.us (Guido van Rossum)
Expires:
Fri, 1 Nov
1996 00:00:00 GMT
Expires:
Sun, 1 Dec
1996 00:00:00 GMT
Supersedes: <D
FMAv8.3Hp
@cwi.nl>
Supersedes: <D
xJ3t1.CJv
@cwi.nl>
Approved: news-answers-request@MIT.Edu
Approved: news-answers-request@MIT.Edu
Archive-name: python-faq/part1
Archive-name: python-faq/part1
Submitted-by: Guido van Rossum <guido@cnri.reston.va.us>
Submitted-by: Guido van Rossum <guido@cnri.reston.va.us>
Version:
1.34
Version:
$Revision$
Last-modified:
9
September 1996
Last-modified:
11
September 1996
This article contains answers to Frequently Asked Questions about
This article contains answers to Frequently Asked Questions about
Python (an object-oriented interpreted programming language -- see
Python (an object-oriented interpreted programming language -- see
the answer to question 1.1 for a short overview).
the answer to question 1.1 for a short overview).
Copyright 1993-199
5
Guido van Rossum. Unchanged electronic
Copyright 1993-199
6
Guido van Rossum. Unchanged electronic
redistribution of this FAQ is allowed. Printed redistribution only
redistribution of this FAQ is allowed. Printed redistribution only
with permission of the author. No warranties.
with permission of the author. No warranties.
...
@@ -214,19 +214,16 @@ Here's an overview of the questions per chapter:
...
@@ -214,19 +214,16 @@ Here's an overview of the questions per chapter:
7. Using Python on non-UNIX platforms
7. Using Python on non-UNIX platforms
7.1. Q. Is there a Mac version of Python?
7.1. Q. Is there a Mac version of Python?
7.2. Q. Is there a DOS version of Python?
7.2. Q. Are there DOS and Windows versions of Python?
7.3. Q. Is there a Windows 3.1(1) version of Python?
7.3. Q. Is there an OS/2 version of Python?
7.4. Q. Is there a Windows NT version of Python?
7.4. Q. Is there a VMS version of Python?
7.5. Q. Is there a Windows 95 version of Python?
7.5. Q. What about IBM mainframes, or other non-UNIX platforms?
7.6. Q. Is there an OS/2 version of Python?
7.6. Q. Where are the source or Makefiles for the non-UNIX versions?
7.7. Q. Is there a VMS version of Python?
7.7. Q. What is the status and support for the non-UNIX versions?
7.8. Q. What about IBM mainframes, or other non-UNIX platforms?
7.8. Q. I have a PC version but it appears to be only a binary.
7.9. Q. Where are the source or Makefiles for the non-UNIX versions?
7.10. Q. What is the status and support for the non-UNIX versions?
7.11. Q. I have a PC version but it appears to be only a binary.
Where's the library?
Where's the library?
7.
12
. Q. Where's the documentation for the Mac or PC version?
7.
9
. Q. Where's the documentation for the Mac or PC version?
7.1
3
. Q. The Mac (PC) version doesn't seem to have any facilities for
7.1
0
. Q. The Mac (PC) version doesn't seem to have any facilities for
creating or editing programs apart from entering it interactively, and
creating or editing programs apart from entering it interactively, and
there seems to be no way to save code that was entered interactively.
there seems to be no way to save code that was entered interactively.
How do I create a Python program on the Mac (PC)?
How do I create a Python program on the Mac (PC)?
...
@@ -1101,72 +1098,74 @@ STDWIN-related lines so it's easy to miss it.
...
@@ -1101,72 +1098,74 @@ STDWIN-related lines so it's easy to miss it.
A. Depending on what platform(s) you are aiming at, there are several.
A. Depending on what platform(s) you are aiming at, there are several.
Currently supported solutions:
- There's a neat object-oriented interface to the Tcl/Tk widget set,
- There's a neat object-oriented interface to the Tcl/Tk widget set,
called Tkinter. As of python 1.1, it is part of the standard Python
called Tkinter. It is part of the standard Python distribution and
distribution -- all you need to do is enable it in Modules/Setup
well-supported -- all you need to do is build and install Tcl/Tk and
(provided you have already installed Tk and Tcl). This is probably
enable the _tkinter module and the TKPATH definition in Modules/Setup
the easiest to install and use, and the most complete widget set. It
when building Python. This is probably the easiest to install and
is also very likely that in the future the standard Python GUI API
use, and the most complete widget set. It is also very likely that in
will be based on or at least look very much like the Tkinter
the future the standard Python GUI API will be based on or at least
interface. For more info about Tk, including pointers to the source,
look very much like the Tkinter interface. For more info about Tk,
see the Tcl/Tk home page <URL:http://www.sunlabs.com/research/tcl/>.
including pointers to the source, see the Tcl/Tk home page
<URL:http://www.sunlabs.com/research/tcl/>. Tcl/Tk is now fully
- The standard Python distribution comes with an interface to STDWIN,
portable to the Mac and Windows platforms (NT and 95 only); you need
a platform-independent low-level windowing interface. You have to ftp
Python 1.4beta3 or later and Tk 4.1patch1 or later.
the source for STDWIN separately,
e.g. <URL:ftp://ftp.cwi.nl/pub/stdwin/> or gatekeeper.dec.com in
pub/misc/stdwin <URL:ftp://gatekeeper.dec.com/pub/misc/stdwin/>.
STDWIN runs under X11 or the Mac; a Windows port has been attempted
but I can't seem to get it working. Note that STDWIN is really not
powerful enough to implement a modern GUI (no widgets, etc.) and that
I don't have the time to maintain or extend it, so you may be better
off using Tkinter or the Motif interface, unless you require
portability to the Mac (which is also offered by SUIT, by the way --
see below).
- For SGI IRIX only, there's an interface to the complete GL (Graphics
Library -- low level but very good 3D capabilities) as well as to
FORMS (a buttons-and-sliders-etc package built on top of GL by Mark
Overmars -- ftp'able from <URL:ftp://ftp.cs.ruu.nl/pub/SGI/FORMS/>).
- There's an interface to X11, including the Athena and Motif widget
- There's an interface to X11, including the Athena and Motif widget
sets (and a few individual widgets, like Mosaic's HTML widget and
sets (and a few individual widgets, like Mosaic's HTML widget and
SGI's GL widget)
in the Extensions set, which is separately ftp'able
SGI's GL widget)
available from
<URL:ftp://ftp.python.org/pub/python/src/
extensions
.tar.gz>.
<URL:ftp://ftp.python.org/pub/python/src/
X-extension
.tar.gz>.
Support by Sjoerd Mullender <sjoerd@cwi.nl>.
- There's an interface to SUIT, the U of Virginia's Simple User
Interface Toolkit; it can be ftp'ed from
- The Mac port has a rich and ever-growing set of modules that support
<URL:ftp://uvacs.cs.virginia.edu/pub/suit/python/SUIT_python.tar.Z>.
the native Mac toolbox calls. See the documentation that comes with
A PC binary of Python 1.0.2 compiled with DJGPP and with SUIT s
upport
the Mac port. See <URL:ftp://ftp.python.org/pub/python/mac>. S
upport
b
uilt-in has been made available by Antonio Costa
b
y Jack Jansen <jack@cwi.nl>.
<URL:ftp://asterix.inescn.pt/pub/PC/python/pyt102su.exe> (a
self-extracting archive). Note that the UVa people themselves have
- The NT port supported by Mark Hammond <MHammond@skippinet.com.au>
expressed doubts about SUIT, and are planning to build a Python GUI
(see question 7.2) includes an interface to the Microsoft Foundation
API based upon Tk (though not necessarily on Tkinter); see
Classes and a Python programming environment using it that's written
<URL:http://server.cs.virginia.edu/~tnb2d/IT/IT.html>.
mostly in Python. See
<URL:ftp://ftp.python.org/pub/python/pythonwin/>.
- There's an interface to WAFE, a Tcl interface to the X11 Motif and
Athena widget sets. Last I heard about it it was included in the WAFE
- There's an object-oriented GUI based on the Microsoft Foundation
1.0 prerelease
Classes model called WPY, supported by Jim Ahlstrom <jim@interet.com>.
<URL:ftp://ftp.wu-wien.ac.at/pub/src/X11/wafe/wafe-1.0.tar.gz-prerelease>.
Programs written in WPY run unchanged and with native look and feel on
Windows NT/95, Windows 3.1 (using win32s), and on Unix (using Tk).
- The NT port by Mark Hammond (see question 7.4) includes an interface
Source and binaries for Windows and Linux are available in
to the Microsoft Foundation Classes and a Python programming
<URL:ftp://ftp.python.org/pub/python/wpy/>.
environment using it that's written mostly in Python. See
<URL:ftp://ftp.python.org/pub/python/nt/>.
Obsolete or minority solutions:
- There's an interface to wxWindows. wxWindows is a portable GUI
- There's an interface to wxWindows. wxWindows is a portable GUI
class library written in C++. It supports XView, Motif, MS-Windows as
class library written in C++. It supports XView, Motif, MS-Windows as
targets. There is some support for Macs and CURSES as well.
wxWindows
targets. There is some support for Macs and CURSES as well.
preserves the look and feel of the underlying graphics toolkit. See
wxWindows preserves the look and feel of the underlying graphics
the wxPython WWW page at
t
oolkit. See t
he wxPython WWW page at
<URL:http://www.aiai.ed.ac.uk/~jacs/wx/wxpython/wxpython.html>.
<URL:http://www.aiai.ed.ac.uk/~jacs/wx/wxpython/wxpython.html>.
Support for wxPython (by Harri Pasanen <pa@tekla.fi>) appears
- There's an object-oriented GUI based on the Microsoft Foundation
to have a low priority.
Classes model called WPY. Programs written in WPY run unchanged and
with native look and feel on NT, Windows 3.1 (using win32s) and on
- For SGI IRIX only, there are unsupported interfaces to the complete
Unix (using Tk). Source and binaries for NT and Linux are available
GL (Graphics Library -- low level but very good 3D capabilities) as
in <URL:ftp://ftp.python.org/pub/python/wpy>.
well as to FORMS (a buttons-and-sliders-etc package built on top of GL
by Mark Overmars -- ftp'able from
<URL:ftp://ftp.cs.ruu.nl/pub/SGI/FORMS/>). This is probably also
becoming obsolete, as OpenGL takes over.
- There's an interface to STDWIN, a platform-independent low-level
windowing interface for Mac and X11. This is totally unsupported and
rapidly becoming obsolete. The STDWIN sources are at
<URL:ftp://ftp.cwi.nl/pub/stdwin/>. (For info about STDWIN 2.0,
please refer to Steven Pemberton <steven@cwi.nl> -- I believe it is
also dead.)
- There once was an interface to WAFE, a Tcl interface to the X11
Motif and Athena widget sets. WAFE is at
<URL:ftp://ftp.wu-wien.ac.at/pub/src/X11/wafe/>. It's not clear what
the status of the Python support is.
- (The Fresco port that was mentioned in earlier versions of this FAQ
- (The Fresco port that was mentioned in earlier versions of this FAQ
no longer seems to exist. Inquire with Mark Linton.)
no longer seems to exist. Inquire with Mark Linton.)
...
@@ -1213,7 +1212,7 @@ can prove by looking at the code that this can't happen (e.g. because
...
@@ -1213,7 +1212,7 @@ can prove by looking at the code that this can't happen (e.g. because
b is a constant or has a type that can never be false), but in general
b is a constant or has a type that can never be false), but in general
this can be a problem.
this can be a problem.
Steve Majewski (or was it Tim Peters?
) suggested the following
Tim Peters (who wishes it was Steve Majewski
) suggested the following
solution: (a and [b] or [c])[0]. Because [b] is a singleton list it
solution: (a and [b] or [c])[0]. Because [b] is a singleton list it
is never false, so the wrong path is never taken; then applying [0] to
is never false, so the wrong path is never taken; then applying [0] to
the whole thing gets the b or c that you really wanted. Ugly, but it
the whole thing gets the b or c that you really wanted. Ugly, but it
...
@@ -1343,8 +1342,8 @@ alias. Incidentally, this trick is also handy if you want to decide
...
@@ -1343,8 +1342,8 @@ alias. Incidentally, this trick is also handy if you want to decide
dynamically (e.g. depending on availability of resources) which base
dynamically (e.g. depending on availability of resources) which base
class to use. Example:
class to use. Example:
BaseAlias = <real base class>
BaseAlias = <real base class>
class Derived(BaseAlias):
class Derived(BaseAlias):
def meth(self):
def meth(self):
BaseAlias.meth(self)
BaseAlias.meth(self)
...
...
...
@@ -1999,8 +1998,8 @@ that a lambda form yields) is assigned!
...
@@ -1999,8 +1998,8 @@ that a lambda form yields) is assigned!
6.10. Q. Why don't lambdas have access to variables defined in the
6.10. Q. Why don't lambdas have access to variables defined in the
containing scope?
containing scope?
A. Because they are implemented as ordinary functions.
See question
A. Because they are implemented as ordinary functions.
4.5 above.
See question
4.5 above.
6.11. Q. Why can't recursive functions be defined inside other functions?
6.11. Q. Why can't recursive functions be defined inside other functions?
...
@@ -2123,58 +2122,43 @@ off-the-shelf technology.
...
@@ -2123,58 +2122,43 @@ off-the-shelf technology.
A. Yes, see the "mac" subdirectory of the distribution sites,
A. Yes, see the "mac" subdirectory of the distribution sites,
e.g. <URL:ftp://ftp.python.org/pub/python/mac/>.
e.g. <URL:ftp://ftp.python.org/pub/python/mac/>.
7.2. Q. Is there a DOS version of Python?
7.2. Q. Are there DOS and Windows versions of Python?
A. Yes, see the "pc" subdirectory of the distribution sites,
e.g. <URL:ftp://ftp.python.org/pub/python/pc/>.
7.3. Q. Is there a Windows 3.1(1) version of Python?
A. Yes. There is a plethora of not-always-compatible versions. See
the "pythonwin", "wpy", "nt" and "pc" subdirectories of the
distribution sites. A quick comparison:
A. Yes, also see the "pc" subdirectory of the distribution sites,
PythonWin: Extensive support for the 32-bit native Windows API and GUI
e.g. <URL:ftp://ftp.python.org/pub/python/pc/>. You may also be able
building using MFC. Windows NT and Windows 95 only (and Windows
to run either of the Windows NT versions (see next question) if you
3.1(1) using win32s, until Microsoft stops supporting it :-( ).
have Microsoft's "win32s"
.
<URL:ftp://ftp.python.org/pub/python/pythonwin/>
.
7.4. Q. Is there a Windows NT version of Python?
WPY: Ports to DOS, Windows 3.1(1), Windows 95, Windows NT and OS/2.
Also contains a GUI package that offers portability between Windows
(not DOS) and Unix, and native look and feel on both.
<URL:ftp://ftp.python.org/pub/python/wpy/>.
A. There are two, both sporting DLL support for dynamic loading of
NT: Basic ports built straight from the 1.4 distribution for Windows
Python modules, and extensions to access the Win32 GUI API.
95 and Windows NT. This will eventually provide core support for
both PythonWin and WPY on all 32-bit Microsoft platforms.
Mark Hammond <MHammond@cmutual.com.au> maintains an NT port which
includes an interface to the Microsoft Foundation Classes and a Python
programming environment using it that's written mostly in Python. See
<URL:ftp://ftp.python.org/pub/python/nt/>.
<URL:ftp://ftp.python.org/pub/python/nt/>.
Jim Ahlstrom's WPY portable GUI runs on Windows NT and is modeled
PC: Old, unsupported ports to DOS, Windows 3.1(1) and OS/2.
after the Microsoft Foundation Classes. Source and binaries are
<URL:ftp://ftp.python.org/pub/python/pc/>.
available in <URL:ftp://ftp.python.org/pub/python/wpy>.
Sam Rushing <rushing@squirl.oau.org> once announced he knows how to
build Python for the Windows NT on the DEC Alpha AXP.
Note that currently there is no unified compilation environment for
all NT platforms -- hopefully Microsoft will fix this with the release
of Visual C++ 2.0.
7.5. Q. Is there a Windows 95 version of Python?
A. The Windows NT versions might work, otherwise the Windows 3.1(1)
version should work (isn't Windows 95 supposed to be backwards
compatible?).
7.
6
. Q. Is there an OS/2 version of Python?
7.
3
. Q. Is there an OS/2 version of Python?
A. Yes,
also see the "pc" subdirectory of the distribution sites,
A. Yes,
see the "pc" and "wpy" subdirectory of the distribution sites
e.g. <URL:ftp://ftp.python.org/pub/python/pc/>
.
(see above)
.
7.
7
. Q. Is there a VMS version of Python?
7.
4
. Q. Is there a VMS version of Python?
A. Donn Cave <donn@cac.washington.edu> did a partial port. The
A. Donn Cave <donn@cac.washington.edu> did a partial port. The
results of his efforts are on public display in
results of his efforts are on public display in
<<URL:ftp://ftp.python.org/pub/python/contrib/vms.tar.gz/>. Someone
<<URL:ftp://ftp.python.org/pub/python/contrib/vms.tar.gz/>. Someone
else is working on a more complete port, for details watch the list.
else is working on a more complete port, for details watch the list.
7.
8
. Q. What about IBM mainframes, or other non-UNIX platforms?
7.
5
. Q. What about IBM mainframes, or other non-UNIX platforms?
A. I haven't heard about these, except I remember hearing about an
A. I haven't heard about these, except I remember hearing about an
OS/9 port and a port to Vxworks (both operating systems for embedded
OS/9 port and a port to Vxworks (both operating systems for embedded
...
@@ -2183,12 +2167,12 @@ newsgroup and ask there, you may find exactly what you need. For
...
@@ -2183,12 +2167,12 @@ newsgroup and ask there, you may find exactly what you need. For
example, a port to MPE/iX 5.0 on HP3000 computers was just announced,
example, a port to MPE/iX 5.0 on HP3000 computers was just announced,
see <URL:http://www.allegro.com/software/>.
see <URL:http://www.allegro.com/software/>.
7.
9
. Q. Where are the source or Makefiles for the non-UNIX versions?
7.
6
. Q. Where are the source or Makefiles for the non-UNIX versions?
A. The standard sources can (almost) be used. Additional sources can
A. The standard sources can (almost) be used. Additional sources can
be found in the platform-specific subdirectories of the distribution.
be found in the platform-specific subdirectories of the distribution.
7.
10
. Q. What is the status and support for the non-UNIX versions?
7.
7
. Q. What is the status and support for the non-UNIX versions?
A. I don't have access to most of these platforms, so in general I am
A. I don't have access to most of these platforms, so in general I am
dependent on material submitted by volunteers(*). However I strive to
dependent on material submitted by volunteers(*). However I strive to
...
@@ -2199,7 +2183,7 @@ version to the various non-UNIX platforms should be easy.
...
@@ -2199,7 +2183,7 @@ version to the various non-UNIX platforms should be easy.
(*) For the Macintosh, that volunteer is me, with help from Jack
(*) For the Macintosh, that volunteer is me, with help from Jack
Jansen <jack@cwi.nl>.
Jansen <jack@cwi.nl>.
7.
11
. Q. I have a PC version but it appears to be only a binary.
7.
8
. Q. I have a PC version but it appears to be only a binary.
Where's the library?
Where's the library?
A. You still need to copy the files from the distribution directory
A. You still need to copy the files from the distribution directory
...
@@ -2222,12 +2206,12 @@ as follows (talking to a DOS prompt):
...
@@ -2222,12 +2206,12 @@ as follows (talking to a DOS prompt):
C> SET PYTHONPATH=C:\misc\python\lib
C> SET PYTHONPATH=C:\misc\python\lib
7.
12
. Q. Where's the documentation for the Mac or PC version?
7.
9
. Q. Where's the documentation for the Mac or PC version?
A. The documentation for the Unix version also applies to the Mac and
A. The documentation for the Unix version also applies to the Mac and
PC versions. Where applicable, differences are indicated in the text.
PC versions. Where applicable, differences are indicated in the text.
7.1
3
. Q. The Mac (PC) version doesn't seem to have any facilities for
7.1
0
. Q. The Mac (PC) version doesn't seem to have any facilities for
creating or editing programs apart from entering it interactively, and
creating or editing programs apart from entering it interactively, and
there seems to be no way to save code that was entered interactively.
there seems to be no way to save code that was entered interactively.
How do I create a Python program on the Mac (PC)?
How do I create a Python program on the Mac (PC)?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment