Commit Graph

14976 Commits

Author SHA1 Message Date
Fred Drake 484d735f1e Delay import of py_compile until needed, since is is only used by the
PyZipFile class.

End sentences in docstrings with periods.

Reformat docstrings to be more similar to those of other modules.
2000-10-02 21:14:52 +00:00
Fred Drake 427802470a Substantially revised documentation for the zipfile module, partially based
on revised text from Jim Ahlstrom <jim@interet.com>.

This closes SourceForge bug #115681.
2000-10-02 20:56:30 +00:00
Fred Drake 5df72f0632 Minor stylesheet nit. 2000-10-02 17:36:27 +00:00
Guido van Rossum 1ea64ea3ab Supporting rl_library_version is more trouble than it's worth --
readline doesn't have it before readline 2.2 and there's no
compile-time way to find out which readline version is in use.

Sigh.  GNU readline sucks.
2000-10-02 15:53:08 +00:00
Fred Drake 3105f920bf Added Daniel Dittmar, for helping get the configuration working for
Reliant UNIX.
2000-10-02 14:52:31 +00:00
Fred Drake 7a40c0702e make_icon_filename(): Convenience function to turn a partial filename
into a usable filename using $ICONSERVER and
                       $IMAGE_TYPE as needed.

get_link_icon():  Function to examine a URL and return the string to use
                  to insert an icon if the link points off-site, if needed
                  and $OFF_SITE_LINK_ICON is set.

Adjusted appropriate places to use these new functions.
2000-10-02 14:43:38 +00:00
Jeremy Hylton 625915eb4f typo 2000-10-02 13:43:33 +00:00
Guido van Rossum e3c3b27d33 Fix a bug in stack overflow error handling. This fixes half of Bug
#115555.

The error from s_push() on stack overflow was -1, which was passed
through unchanged by push(), but not tested for by push()'s caller --
which only expected positive error codes.  Fixed by changing s_push()
to return E_NOMEM on stack overflow.  (Not quite the proper error code
either, but I can't be bothered adding a new E_STACKOVERFLOW error
code in all the right places.)
2000-10-02 10:21:59 +00:00
Fred Drake f6791f3d12 Minor usage fix.
Add a note that some way of reliably detecting the use of KDE would be
really nice.
2000-10-02 03:42:43 +00:00
Fred Drake 3944a01713 Do not set Konquerer to be the default browser if $KDEDIR is set -- some
Linux distributions which provide both KDE and Gnome set this environment
variable even if the user is not using KDE.  We do *not* want to start
Konquerer if KDE is not running unless the user actually tells us to!
2000-10-02 03:40:51 +00:00
Fred Drake 8d3312f4d1 Add documentation and warnings for the isCallable(), isMappingType(),
isNumberType(), and isSequenceType() functions.

This closes SourceForge bug #115789.
2000-10-02 03:36:18 +00:00
Greg Ward 0295181fa6 Typo fix. 2000-10-02 02:25:51 +00:00
Greg Ward 73a6c942cd Added the ability to do byte-compilation at build time, currently off
by default (since compiling at install time works just fine).  Details:
  - added 'compile' and 'optimize' options
  - added 'byte_compile()' method
  - changed 'get_outputs()' so it includes bytecode files
A lot of the code added is very similar to code in install_lib.py;
would be nice to factor it out further.
2000-10-02 02:19:04 +00:00
Greg Ward 8161022d4d Added --compile, --optimize options so users have an easy way to
instruct the "install_lib" command from the command-line.
2000-10-02 02:16:04 +00:00
Greg Ward cb9c9aed01 Finished the overhaul of byte-compilation options: there's now a 6-way
choice between (compile, no-compile) * (optimize=0, optimize=1,
optimize=2).  Details:
  - added --no-compile option to complement --compile, which has
    been there for ages
  - changed --optimize (which never worked) to a value option, which
    expects 0, 1, or 2
  - renamed 'bytecompile()' method to 'byte_compile()', and beefed
    it up to handle both 'compile' and 'optimize' options
  - fix '_bytecode_filenames()' to respect the new options
2000-10-02 02:15:08 +00:00
Greg Ward 04cc88df05 Remove the temporary byte-compilation script when we're done with it. 2000-10-02 02:09:55 +00:00
Greg Ward c1acc69018 From 'run()', only call 'bytecompile()' if we actually have
pure Python modules to compile.
2000-10-01 23:50:13 +00:00
Greg Ward f217e2124a Tweaked 'byte_compile()' so it silently skips non-Python files, rather than
blowing up.
2000-10-01 23:49:30 +00:00
Martin v. Löwis 4b6ea798cb Don't rename Tkinter to Tk; closes bug 115714
Subclass Error from Exception.
2000-10-01 17:52:01 +00:00
Fred Drake 145f96eb36 my_getpagesize(): New function; returns the size of a page of memory.
Versions are defined for Windows and Unix; the Unix
                   flavor uses sysconf() to get the page size; this avoids
                   the use of getpagesize(), which is deprecated and
                   requires an additional library on some platforms
                   (specifically, Reliant UNIX).

This partially closes SourceForge bug #113797.
2000-10-01 17:50:46 +00:00
Barry Warsaw 370a29fe42 Added a zip() test where one of the arguments is an instance whose
class has no __getitem__().  This raises an AttributeError.
2000-10-01 04:28:43 +00:00
Fred Drake cc4adf27f4 Add missing "s" from format string.
This closes SourceForge patch #101714.
2000-09-30 23:59:04 +00:00
Greg Ward 0bc5953e83 Added skeletal "Building Extensions: Tips and Tricks" section. This
is where all the FAQs about extension-building will be answered.
2000-09-30 21:06:40 +00:00
Greg Ward 1df6e7b1fc Reduced the 'bytecompile()' method to a one-line wrapper around
'util.byte_compile()'.  Currently just reproduces the existing functionality
-- doesn't use any of the fancy features in the new 'byte_compile()'.
2000-09-30 20:39:09 +00:00
Greg Ward 1297b5ce67 Added 'byte_compile(): an all-singing, all-dancing wrapper around the
standard 'py_compile.compile()' function.  Laundry list of features:
  - handles standard Distutils 'force', 'verbose', 'dry_run' flags
  - handles various levels of optimization: can compile directly in
    this interpreter process, or write a temporary script that is
    then executed by a new interpreter with the appropriate flags
  - can rewrite the source filename by stripping an optional prefix
    and preprending an optional base dir.
2000-09-30 20:37:56 +00:00
Greg Ward 4752769d08 Various docstring tweaks.
Fixed 'subst_vars()' so it actually blows up like the docstring claims
  (and fixed the docstring not to claim it handles ${var}, which it
  doesn't).
2000-09-30 18:49:14 +00:00
Greg Ward b8b263b92f Reformat docstrings. 2000-09-30 18:40:42 +00:00
Greg Ward cb1f4c4d33 Standardized whitespace around function calls. 2000-09-30 18:27:54 +00:00
Greg Ward 963cd2d85d Andrew Kuchling: changed so the '_path_created' dictionary is keyed on
absolute pathnames; this lets it keep working in the face of chdir'ing
around.
2000-09-30 17:47:17 +00:00
Greg Ward 3e6d43801b Fixed 'run()' so it doesn't call 'bytecompile()' if 'install()' returned None. 2000-09-30 17:35:26 +00:00
Greg Ward e564278bfd Expect a tuple (dest_name, copied) from 'copy_file()'. 2000-09-30 17:34:50 +00:00
Marc-André Lemburg ff50ad53a9 Fix header file usage so that NULL is defined. NULL is needed by
unicodedata_db.h.
2000-09-30 17:34:31 +00:00
Greg Ward 3a5a2bd486 Changed 'build_module()' so it returns the result of 'copy_file()'
on the module file -- could be useful for subclasses overriding it.
2000-09-30 17:33:05 +00:00
Greg Ward 0d4a853109 Changed 'copy_file()' so it returns a tuple (dest_name, copied) -- hopefully,
this will please everyone (as if that's possible).
2000-09-30 17:29:35 +00:00
Greg Ward ec84c21ce2 In 'get_platform()', handle so-called POSIX systems that don't have
'uname()' -- specifically NeXTSTEP.
2000-09-30 17:09:39 +00:00
Greg Ward 64d855adca Changed to use the 'sub-commands' machinery:
- added 'sub_commands' class attr
  - added 'has_*()' predicates referenced by the sub-command list
  - rewrote 'run()' so it's a trivial loop over relevant sub-commands
2000-09-30 17:08:12 +00:00
Greg Ward 70b1fd1a99 Moved some things around for better organization. 2000-09-30 17:05:37 +00:00
Martin v. Löwis d15a9427e8 Fixed spelling of module; closes bug 115712. 2000-09-30 17:04:40 +00:00
Martin v. Löwis efffd28c2c Add mimetools testcase. 2000-09-30 17:03:19 +00:00
Martin v. Löwis 25d1692434 Return after writing 7bit or 8bit encodings. Closes bug 115712 2000-09-30 16:52:45 +00:00
Martin v. Löwis af484d5a0c Mention in the module's doc string that other functions of the socket API
appear as methods on socket objects.
2000-09-30 11:34:30 +00:00
Fred Drake 58295dedf7 Replace to XXX notes to add references with real references. 2000-09-30 00:11:45 +00:00
Fred Drake 5db246d1fa Always use the same name for the exception defined in this module!
Error reported via email by Pete Shinners <pete@visionart.com>.

Fixed some indentation inconsistencies.
2000-09-29 20:44:48 +00:00
Fred Drake a77254a724 PyModule_AddStringConstant(): Make this static since it isn't used
elsewhere in 1.5.2.
2000-09-29 19:23:29 +00:00
Martin v. Löwis c0718eba21 Remove unused VERSION #define.
Add PyModule_AddStringConstant and PyModule_AddObject if version <2.0,
to allow to share this file with PyXML.
2000-09-29 19:05:48 +00:00
Martin v. Löwis 3f0969f100 Use string functions instead of methods to allow sharing this module with PyXML 2000-09-29 19:00:40 +00:00
Martin v. Löwis 491ded78cc Remove dependency from saxutils when loading xmlreader 2000-09-29 18:59:50 +00:00
Fred Drake 9f11cf8811 Capitalized an "if" that should have been -- noted by Grant Griffin
<grant.griffin@honeywell.com>.
2000-09-29 17:54:40 +00:00
Fred Drake 0b5fb2bfc8 Add a paragraph about an optimization bug in SGI compilers which affects
complex objects, and explain how to build so that Objects/complexobject.c
is compiled without optimization.

Closing SourceForge bug #110695 as "Won't Fix".
2000-09-29 17:45:05 +00:00
Fred Drake ffe58ca6ef Reversely --> Conversely
This closes SourceForge bug #115673.
2000-09-29 17:31:54 +00:00