Commit Graph

6346 Commits

Author SHA1 Message Date
Guido van Rossum a3beb63eb7 Removing emacs.py, which is obsolete. 1997-09-29 13:19:53 +00:00
Guido van Rossum da286666b2 Add optional bufsize argument to various calls so we can make the
os.fdopen() calls unbuffered.  I presume that it's enough if we can
make all three of them (for stdin, stdout, and stderr) unbuffered and
don't need to specify different buffer sizes per file -- that would
complicate the interface more than I care for.
1997-09-29 04:04:39 +00:00
Guido van Rossum 54e2091ba2 Add an optional hack for threads in Tkinter.
This one works!  However it requires using a modified version of
tclNotify.c (provided), which requires access to the Tcl source
to compile it.  In order to enable this hack, add the following
to the Setup line for _tkinter:
   tclNotify.c -DHAVE_PYTCL_WAITUNTILEVENT -I$(TCL)/generic
where TCL points to the source tree of Tcl 8.0.  Other versions
of Tcl are not supported.

The tclNotify.c file is copyrighted by Sun Microsystems; the
licensing terms are in the file license.terms.  According to this
file, no further permission to distribute this is required,
provided the file license.terms is included.  Hence, I am checking
that in, too.
1997-09-28 05:52:41 +00:00
Guido van Rossum a9f02b8bad Add plat- prefix to MACHDEPPATH, now that it's been removed from MACHDEP. 1997-09-28 05:45:40 +00:00
Guido van Rossum b97ef1768f Remove plat- prefix from MACHDEP macro;
instead it is added to MACHDEPPATH in Modules/Setup.in
1997-09-28 05:44:03 +00:00
Guido van Rossum 49f9d8e405 Changes submitted by Marc-Andre Lemburg to add two tables: errorcode
maps errno numbers to errno names (e.g. EINTR), and errorcode maps
them to message strings.  (The latter is redundant because
the new call posix.strerror() now does the same, but alla...)
1997-09-28 05:41:56 +00:00
Guido van Rossum 4518823ad0 In whichmodule(), use __module__ if set. 1997-09-28 05:38:51 +00:00
Guido van Rossum b6c935a933 Set the completer's word break characters appropriate for Python. 1997-09-26 23:00:37 +00:00
Guido van Rossum 4752966193 Use Marc Lemburg's tb_lineno() to calculate the correct line number.
Apparently the traceback object doesn't contains the right linenumber
when -O is used.  Rather than guessing whether -O is on or off, use
tb_lineno() unconditionally.
1997-09-26 22:43:02 +00:00
Guido van Rossum 2781fbe46c Word completion for the new readline.set_completer() function.
When completing a simple identifier, it completes keywords, built-ins
and globals in __main__; when completing NAME.NAME..., it evaluates
(!) the expression up to the last dot and completes its attributes.

It's very cool to do "import string" type "string.", hit the
completion key (twice), and see the list of names defined by the
string module!

Tip: to use the tab key as the completion key, call

    readline.parse_and_bind("tab: complete")
1997-09-26 22:04:56 +00:00
Guido van Rossum 290900a5d7 Reordered and reformatted, and added some cool new features:
set_completer(function)
parse_and_bind(string)
read_init_file(filename)

The first is the most exciting feature: with an appropriate Python
completer function, it can do dynamic completion based on the contents
of your namespace!
1997-09-26 21:51:21 +00:00
Guido van Rossum ee81af8977 Release interpreter lock around readline call in [raw_]input(). 1997-09-26 21:47:43 +00:00
Guido van Rossum 5edcf34fac Change bind() to tag_bind() so it works again. 1997-09-24 13:39:51 +00:00
Guido van Rossum 3bbeb7a318 Fix by Sjoerd: don't want to resize to zero length. 1997-09-22 16:14:27 +00:00
Guido van Rossum 03be7f525e Changes by jack so the generated modules export their types
to Python.
1997-09-22 16:13:19 +00:00
Jack Jansen a755e68df6 Export type objects to Python 1997-09-20 17:40:22 +00:00
Guido van Rossum 6dd4868681 The command can now either be a string (as before) or a list of
arguments for execvp (for those who don't want the shell's argument
parsing).
1997-09-18 20:00:39 +00:00
Barry Warsaw 963b871e86 Py_Initialize(): move the call to _PyImport_FixupExtension() to after
the phase 2 init of the __builtin__ module, so that multiple
interpreters will get the right exceptions.
1997-09-18 16:42:02 +00:00
Barry Warsaw b01a7fa5f8 initerrors(): Eliminate circular reference which was causing a small
but annoying memory leak.  This was introduced when PyExc_Exception
was added; the loop above populating the PyExc_StandardError exception
tuple started at index 1 in bltin_exc, but PyExc_Exception was added
at index 0, so PyExc_StandardError was getting inserted in itself!
How else can a tuple include itself?!

Change the loop to start at index 2.

This was a *fun* one! :-)
1997-09-18 03:44:38 +00:00
Barry Warsaw 412cdc2284 [Py_Exc]NumberError => [Py_Exc]ArithmeticError 1997-09-16 21:51:14 +00:00
Barry Warsaw 25131faffe NumberError => ArithmeticError 1997-09-16 21:50:59 +00:00
Guido van Rossum 2d2c34445b New API PyErr_NewException(name, base, dict) to create simple new exceptions. 1997-09-16 21:50:37 +00:00
Barry Warsaw 65349a3936 [Py_Exc]NumberError => [Py_Exc]ArithmeticError 1997-09-16 21:50:36 +00:00
Barry Warsaw 2f5f6a2595 PyErr_Print(): When printing a class exception, try to dig out the
__module__ string and if found, print <module>.<class>, unless
<module> == "exceptions".
1997-09-16 21:42:03 +00:00
Guido van Rossum b81b5c72db Moved pystone to Lib/test. Use import test.pystone to run it. 1997-09-16 18:57:42 +00:00
Guido van Rossum d2ba3690ce Skip symlinks; don't bother keeping a list of files that is never used. 1997-09-16 18:57:14 +00:00
Guido van Rossum 7617e05a9b New API PyErr_NewException(name, base, dict) to create simple new exceptions. 1997-09-16 18:43:50 +00:00
Guido van Rossum 0474832d9c Introduce PyExc_Exception as the conceptual root class for all exceptions. 1997-09-16 18:43:15 +00:00
Guido van Rossum c56ba38350 Two subtle changes:
(1) Introduce Exception as the conceptual root class for all exceptions.

(2) Do less work in __init__(), and more in __str__ (store args
unchanged).
1997-09-16 18:42:04 +00:00
Guido van Rossum 3d26cc9542 Move the "import readline" to an earlier place so it is also done when
"-i" is given.  (Yes, I know, giving in to Marc Lemburg who wanted
this :-)
1997-09-16 16:11:28 +00:00
Guido van Rossum b6a4716298 Add strerror() interface. 1997-09-15 22:54:34 +00:00
Guido van Rossum a2f626ff58 Patch by Case Roole <cjr@bound.xs4all.nl> to fail with a more
explanatory message when the manual directories aren't found.
(I have to say I'm surprised that it actually still works!)
1997-09-15 15:39:11 +00:00
Guido van Rossum 7883e1dfbd Entirely rewritten parseaddr() function by Sjoerd Mullender.
(Includes a patch he sent me a few days later.)
1997-09-15 14:12:54 +00:00
Guido van Rossum a1dbe50ec2 Added code to emit trailing ',' for singleton tuples in two places. 1997-09-14 23:21:51 +00:00
Guido van Rossum 83551bfeda Export names for the types defined by this module: TkappType and TkttType. 1997-09-13 00:44:23 +00:00
Guido van Rossum 4fb5b28dfc Three independent changes:
- Don't use "from copy_reg import *".

- Use cls.__module__ instead of calling whichobject(cls, cls.__name__);
  also try __module__ in whichmodule(), just in case.

- After calling save_reduce(), add the object to the memo.
1997-09-12 20:07:24 +00:00
Guido van Rossum 7cc56eb524 When creating a class, set its __module__ attribute to the module
whose name is in the current globals' __name__ variable.  If __name__
is not set, ignore this.
1997-09-12 20:04:46 +00:00
Guido van Rossum 626a8d034c Added hint to skip the heavy stuff on first reading. 1997-09-11 23:01:04 +00:00
Guido van Rossum 7ade6da866 As Paul Prescod pointed out, metaprogramming is really something
different (programs that write programs).  We are dealing with
metaclasses here.  So change the words slightly.
1997-09-11 22:54:49 +00:00
Guido van Rossum abffd00502 Install config.h under $exec_prefix/include rather than $exec_prefix/lib. 1997-09-11 14:37:59 +00:00
Guido van Rossum 0207e6de38 Added docstrings. Not for the obsolete functions though. 1997-09-09 22:04:42 +00:00
Guido van Rossum c172f26861 Deleted find_module_in_package and find_module_in_directory -- they
aren't needed and it was a mistake to add them.
1997-09-09 20:54:35 +00:00
Guido van Rossum 3cdb8f3286 Update the description and the example to the new functionality, which
is mostly concentrated in a generalized find_module() and the new
load_module().  Added the new module type constants.  Declare that
SEARCH_ERROR and a whole bunch of module-type-specific functions are
obsolete.
1997-09-09 20:53:37 +00:00
Guido van Rossum 4ece95d55a #Added doc string. 1997-09-09 20:44:04 +00:00
Guido van Rossum 4f9f8e3599 Make functionality more closely the same as what's implemented by default. 1997-09-09 20:39:58 +00:00
Guido van Rossum 501d0bb7ad *** empty log message *** 1997-09-09 20:35:20 +00:00
Guido van Rossum a86f77d4dd Crrected a flow control error that caused the wrong error message when
load-module() didn't find a built-in or frozen module.  Also got rid
of is_frozen(), which duplicated the functionality of
find_frozen()!=NULL.
1997-09-09 18:53:47 +00:00
Jack Jansen b95901ec2e Implemented balloon help for EditPythonPrefs 1997-09-09 13:58:19 +00:00
Jack Jansen 80b5329f76 Added Help module 1997-09-09 13:57:59 +00:00
Jack Jansen 675cda0787 Added a button to increment buildno, so it doesn't happen
automatically all the time.
1997-09-09 13:57:15 +00:00