summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* In Win32 version of listdir(), when FindFirstFile() returnsGuido van Rossum1998-08-061-0/+2
| | | | | ERROR_FILE_NOT_FOUND, return an empty list instead of raising an exception.
* Removed unused variables.Guido van Rossum1998-08-061-4/+0
|
* Undo a silly effect of a global substitution: the macintosh panic()Guido van Rossum1998-08-051-1/+1
| | | | | function had a reference to vPySys_WriteStderr(...) -- turn it back into fprintf(stder, ...).
* Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum1998-08-0412-14/+132
|
* Added gethostbyname_ex(), which returns the same kind of data asGuido van Rossum1998-08-041-37/+99
| | | | | | | | gethostbyaddr(). (Plain gethostbyname() returns only the IP address.) This moves the code shared by gethostbyaddr() and gethostbyname_ex() to a subroutine. Original patch by Dan Stromberg; some tweaks by GvR.
* parser__pickler(): Use Py_DECREF() when reference is known to be non-NULL.Fred Drake1998-08-041-1/+1
|
* Patch by Jody Winston (with my changes) to add some of the "waitGuido van Rossum1998-08-041-0/+151
| | | | | status inspection" macros as functions: WEXITSTATUS(), WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
* Better error messages when raising ValueError for int literals. (TheGuido van Rossum1998-08-041-8/+3
| | | | | previous version of this code would not show the offending input, even though there was code that attempted this.)
* Make sure that at least one digit has been consumed in atoi().Guido van Rossum1998-07-251-0/+4
|
* Use 'S' format character for the optional constructor argument, so weGuido van Rossum1998-07-241-1/+1
| | | | | get a decent error message when it's not a string (instead of confusing errors when trying to use the thing).
* Several changes to support inclusion of filename in releventBarry Warsaw1998-07-231-13/+21
| | | | | | | | | | | | | | | | | | | | | exceptions: posix_error_with_filename(): New function which calls PyErr_SetFromErrnoWithFilename() The following methods have been changed to call posix_error_with_filename(): posix_1str() posix_strint() posix_strintint() posix_do_stat() posix_mkdir() posix_utime() posix_readlink() posix_open() INITFUNC(): os.error (nee PosixError) is PyExc_OSError
* (pause_doc): Sun CC complains about newline in string literalBarry Warsaw1998-07-211-2/+2
|
* Add test for failure of the getattr call in pcre_expand() -- it usedGuido van Rossum1998-07-171-0/+4
| | | | to core dump if the first argument did not have a "group" attribute.
* I_getattr(),Fred Drake1998-07-171-1/+7
| | | | | O_getattr(): Added read-only access to the closed attribute, based on comment from Michael Scharf <Michael.Scharf@Rhein-Neckar.de>.
* Temporarily get rid of the registration of Tcl_Finalize() as aGuido van Rossum1998-07-141-0/+5
| | | | | | | | | low-level Python exit handler. This can attempt to call Python code at a point that the interpreter and thread state have already been destroyed, causing a Bus Error. Given the intended use of Py_AtExit(), I'm not convinced that it's a good idea to call it earlier during Python's finalization sequence... (Although this is the only use for it in the entire distribution.)
* Marc-Andre Lemburg's patch to support instance methods with otherGuido van Rossum1998-07-081-3/+15
| | | | callable objects than regular Pythonm functions as their im_func.
* Add a cast that a picky SGI compiler found was necessary.Guido van Rossum1998-07-071-1/+1
|
* Fix a benign problem found by a picky SGI compiler (unreachable breakGuido van Rossum1998-07-071-1/+0
| | | | after a return).
* Fix benign problems found by a picky SGI compiler (unreachable breakGuido van Rossum1998-07-071-2/+0
| | | | after a return or goto).
* Fix benign problems found by a picky SGI compiler (unreachable breakGuido van Rossum1998-07-072-20/+0
| | | | after a return).
* Fix some problems that a picky SGI compiler reported. Two were benignGuido van Rossum1998-07-071-3/+1
| | | | | (unreachable break after a return) but one was a real bug: ReadFrames() was getting a bogus framecount because of a missing '&'.
* Added copious docstrings, plus two minor layout tweaks.Guido van Rossum1998-07-071-39/+309
|
* On Windows, put the select file descriptor arrays on the heap.Guido van Rossum1998-07-021-0/+22
| | | | | This is because they are huge and the stack is limited on Windows. Other platforms keep declaring it on the stack.
* Unsigned 1 and 2 byte sized formats shouldn't result in long integer values!Guido van Rossum1998-06-291-2/+8
|
* # Added missing semicolon (was #ifdef'ed out in edit on Windows).Guido van Rossum1998-06-281-1/+1
|
* Added doc strings.Guido van Rossum1998-06-282-10/+98
|
* Added doc strings.Guido van Rossum1998-06-271-11/+114
|
* # Remove an extra blank line from a doc string.Guido van Rossum1998-06-271-1/+0
|
* Added doc strings. Also export LockType from the modoule, and give itGuido van Rossum1998-06-271-15/+102
| | | | a doc string.
* Added <ctype.h>, needed for Windows.Guido van Rossum1998-06-191-0/+1
|
* There was an error check in a loop in PythonCmd which calledGuido van Rossum1998-06-191-1/+1
| | | | | | | PythonCmd_Error() but failed to return. The error wasn't very likely (only when we run out of memory) but since the check is there we might as well return the error. (I think that Barry introduced this buglet when he added error checks everywhere.)
* # Note: a previous checkin message was lost because I can now use CVSGuido van Rossum1998-06-151-36/+7
| | | | | | | | | # from my PC at home, but it can't send email :-( Add a clarifying comment about the new ENTER_OVERLAP and LEAVE_OVERLAP_TCL macros; get rid of all the bogus tests for deleted interpreters (Tcl already tests for this; they were left over from an earlier misguided attempt to fix the threading).
* # (My first checkin from Windows NT using remote CVS!)Guido van Rossum1998-06-151-52/+134
| | | | | | | | | | | | | | | | | | | | There were some serious problem with the thread-safety code. The basic problem was that often the result was gotten out of the Tcl interpreter object after releasing the Tcl lock. Of course, another thread might have changed the return value already, and this was indeed happening. (Amazing what trying it on a different thread implementation does!) The solution is to grab the Python lock without releasing the Tcl lock, so it's safe to create a string object or set the exceptions from the Tcl interpreter. Once that's done, the Tcl lock is released. Note that it's now legal to acquire the Python lock while the the Tcl lock is held; but the reverse is not true: the Python lock must be released before the Tcl lock is acquired. This in order to avoid deadlines. Fortunately, there don't seem to be any problems with this.
* Fixed the EventHook() code so that it also works on Windows, sort of.Guido van Rossum1998-06-131-6/+26
| | | | | | | | | | | | | (The "sort of" is because it uses kbhit() to detect that the user starts typing, and then no events are processed until they hit return.) Also fixed a nasty locking bug: EventHook() is called without the Tcl lock set, so it can't use the ENTER_PYTHON and LEAVE_PYTHON macros, which manipulate both the Python and the Tcl lock. I now only acquire and release the Python lock. (Haven't tested this on Unix yet...)
* On Windows, make the pipe() call return Unix file descriptors insteadGuido van Rossum1998-06-121-2/+5
| | | | | of Windows file handles. Now it is at least compatible with itself on Unix!
* In tcsetattr(), first initialize the mode structure by callingGuido van Rossum1998-06-121-0/+3
| | | | | tcgetattr(). This seems to be the only correct way to cope with platform-specific structure members...
* Added strptime, if it exists. Modified after a patch by Jesse Hallio.Guido van Rossum1998-06-091-10/+53
|
* Sorry, the initializer for ob_type must really be NULL,Guido van Rossum1998-05-291-1/+1
| | | | else the damn thing won't compile on Windows :-(
* On Windows, need #include <windows.h>; and it's MS_WINDOWS, not MS_WIN32.Guido van Rossum1998-05-291-2/+6
|
* Changes to make it possible to write multi-threaded programs usingGuido van Rossum1998-05-281-152/+390
| | | | | | | | | | Tkinter. This adds a separate lock -- read the comments. (This was also needed for Mark Hammond's attempts to make PythonWin Tkinter-friendly.) The changes have affected the EventHook slightly, too; and I've done some more cleanup of the code that deals with the different versions of Tcl_CreateFileHandler().
* Some systems (e.g. Linux) use enums for some symbols (like IPPROTO_IP)Guido van Rossum1998-05-281-0/+11
| | | | | | so that our #ifdef test has the wrong effect. Substitute hardcoded values for some important symbols (but not for the whole range -- some are pretty obscure so it's not worth it).
* get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).Fred Drake1998-05-281-1/+1
|
* t_bootstrap(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).Fred Drake1998-05-281-1/+1
|
* Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred() == ... in twoFred Drake1998-05-281-2/+4
| | | | places.
* Use a different implementation of EventHook(). The new versionGuido van Rossum1998-05-221-37/+74
| | | | | | | | | | registers an input file handler for stdin with Tcl and handles Tcl events until something is available on stdin; it then deletes the handler and returns from EventHook(). This works with or without GNU readline, and doesn't busy-wait. It still doesn't work for Mac or Windows :-(
* Add an alias (and preferred name) "contains" for "sequenceIncludes".Guido van Rossum1998-05-221-47/+34
| | | | | | | | Rationalized the doc strings. Also simplify the module initialization -- we don't need a __version__ which is set to "$Rev" :-) and we don't need a fatal error when the initialization fails.
* I think there was a tiny bug in new_function() -- the 'defaults'Guido van Rossum1998-05-221-1/+1
| | | | | argument was initialized to Py_None, but later checked for NULL. Consistently use Py_None.
* PySequence_In() -> PySequence_Contains().Guido van Rossum1998-05-221-1/+1
|
* Make sure that no use of a function pointer gotten from aGuido van Rossum1998-05-221-3/+5
| | | | | tp_as_sequence or tp_as_mapping structure is made without checking it for NULL first.
* Correct bug doc string (discovered by Berthold Hoellmann):Guido van Rossum1998-05-201-1/+1
| | | | get_line_buffer() does not take an optional argument.