See All Titles |
![]() ![]() Python on UNIX SystemsProbably, UNIX users are the largest slice of the Python community pie graph, which consequently turns this system into the one that has the most tested distribution. The only thing that can be considered a negative aspect is the fact that you have to compile and build the distribution yourself. But that's understandable because there are several different types of UNIX out there. However, to make things simple, nowadays most Linux distributions already come with Python installed for you. You just need to check whether it is the latest version available. Sometimes, people build Python with some modules disabled (for instance, optional modules and modules that belong to specific Operating Systems). If that's your case, and you feel that you are missing something such as the Tkinter module, you can rebuild Python yourself. Note
The Tk toolkit is portable to many UNIX platforms, which makes Tkinter a portable GUI option across different UNIX systems. In order to enable the modules that are disabled on your system, you need to copy the file /Modules/Setup.in (located at the source distribution) to Setup, and edit that file. Note that each line in the file lists the module name, the source file, compiler options, and linked libraries. Take a look in the following line: #readline readline.c -lreadline -ltermcap In order to add the GNU readline program to your Python executable, you need to uncomment the line, and rebuild the interpreter by typing the following commands in the top-level directory of the source tree. See Chapter 17, "Development Tools," for more details. make make install The standard Python distribution contains some extensions that are specifically for UNIX systems, such as crypt, dbm, gdbm, grp, pwd, stat, and termios. These modules aren't available for Windows or for Mac platforms. SGI systems, on the other hand, also have their specific modules, which are SunOS/Solaris systems have their specific module as well: sunaudiodev, which is used to access the audio device. There are also some Linux specific modules, such as linuxaudiodev, included with Python.
|
Index terms contained in this sectional moduleAL module cd module enabling modules UNIX operating systems fl module FL module flp module fm module FORMS library libraries FORMS modules al AL cd enabling UNIX operating systems fl FL flp fm sunaudiodev running Python UNIX sunaudiodev module Tk toolkit toolkits Tk turning on modules UNIX operating systems UNIX running Python |
© 2002, O'Reilly & Associates, Inc. |