Commit Graph

1035 Commits

Author SHA1 Message Date
Guido van Rossum b8f512bfa4 Bump version to 0.6 for the event of the Python 1.6 alpha 1 release. 2000-03-30 20:30:34 +00:00
Barry Warsaw bc9476ebe5 __pushtodev(): Ignore transient sunaudiodev.errors when setting the
device info.  I don't know why these occur, but they seem to be
shortlived and harmless.
2000-03-29 21:05:53 +00:00
Guido van Rossum 918429b3b2 Moved robotparser.py to the Lib directory.
If you do a "cvs update" in the Lib directory, it will pop up there.
2000-03-29 16:02:45 +00:00
Guido van Rossum 84306246f1 Fix suggested by Magnus Kessler: in class Page, it is possible for
self.parser to be None; in that case don't dereference it in
getnames().
2000-03-28 20:10:39 +00:00
Guido van Rossum dc8b7980e0 Skip Montanaro:
The robotparser.py module currently lives in Tools/webchecker.  In
preparation for its migration to Lib, I made the following changes:

    * renamed the test() function _test
    * corrected the URLs in _test() so they refer to actual documents
    * added an "if __name__ == '__main__'" catcher to invoke _test()
      when run as a main program
    * added doc strings for the two main methods, parse and can_fetch
    * replaced usage of regsub and regex with corresponding re code
2000-03-27 19:29:31 +00:00
Fred Drake 70b5d47f71 From Sjoerd Mullender <sjoerd@oratrix.nl>:
cmp is not used in freeze, but is imported anyway.  What's worse, cmp
is no longer in the library, so freeze won't work like this.
2000-03-23 18:13:10 +00:00
Fred Drake bae57a88a6 Of course, I forget how to type long ago...
Typo noted by /F.
2000-03-17 16:56:23 +00:00
Fred Drake 1966004986 "write marshalled" --> "writes marshalled" (in docstring); noted by
Detlef Lannert <lannert@lannert.rz.uni-duesseldorf.de>.
2000-03-17 15:43:37 +00:00
Jeremy Hylton 36cc6a2197 complete rewrite
code generator uses flowgraph as intermediate representation.  the old
    rep uses a list with explicit "StackRefs" to indicate the target
    of jumps.

pyassem converts flowgraph to bytecode, breaks up individual steps of
    generating bytecode
2000-03-16 20:06:59 +00:00
Jeremy Hylton f635abee3a simplify visitor walker class
- remove postorder
- remove protocol for automatically walking children based on visitor
  method return value; now only walks if there is no method
2000-03-16 20:04:16 +00:00
Jeremy Hylton b631b8ede5 fix list.append problems 2000-03-16 20:03:04 +00:00
Jeremy Hylton e4d6293383 change name of Set method: items -> elements (avoids confusion with
dict)
2000-03-16 20:02:38 +00:00
Guido van Rossum 7f1cd296c6 Tim Peters writes:
Fix bad auto-indent I recently introduced when replacing the regexp that
could cause re to blow up:

    if or_any_other_block_opener:
        # one indenting comment line
            ^ cursor ended up at the caret (the bug)
        ^ but belongs here (the post-patch behavior)
2000-03-13 14:50:24 +00:00
Guido van Rossum 34a79115c5 Marc-Andre Lemburg: added
gencodec.py - Create Python codecs from Unicode mapping files
2000-03-10 22:36:57 +00:00
Jeremy Hylton 329e4be05a a simple client-server framework for executing code in a different
process

not yet connected with IDLE
2000-03-09 19:56:50 +00:00
Barry Warsaw a17e0f1b61 A bunch of changes, primarily to command line argument parsing
(inspired by Detlef Lannert).  Specifically,

    -k/--keyword no longer takes an optional argument to clear the
    default keywords.  Instead, use -K/--no-default-keywords to clear
    them.

    -n/--add-location also no longer takes an optional argument to set
    the comment style.  Instead, use -S/--style to set the comment
    style to GNU or Solaris.

    -o/--output can take `-' as the filename, meaning write to
    standard output.

    The inputfile name can also be `-' meaning read from standard in.

A few other changes include

    Kludge to mark the file docstring as translatable.  Since the
    marking is to place _() around the docstring, and because we
    actually have to define the _() function before we use it, this
    means that we have to manually assign to __doc__ the output of
    _().  This doesn't seem too bad because you'll only use this idiom
    when translating a script's docstring (you really don't need to
    translate most module docstrings).

    Convert everything to string methods and do not import the string
    module.

    Bump the version number to 1.1
2000-03-08 15:18:35 +00:00
Guido van Rossum 9de988315a Override the Undo delegator to forbid any changes before the I/O mark.
It beeps if you try to insert or delete before the "iomark" mark.
This makes the shell less confusing for newbies.
2000-03-07 18:51:49 +00:00
Jeremy Hylton 6fbd1f85d9 replace : with = 2000-03-07 17:56:47 +00:00
Jeremy Hylton ae1f3bd7bd rename the global IdleConfParser object from IdleConf to idleconf
standard usage is now from IdleConf import idleconf
2000-03-07 17:56:27 +00:00
Jeremy Hylton 6b3edf0510 rename the global IdleConfParser object from IdleConf to idleconf
standard usage is now from IdleConf import idleconf

replace : with = in config.txt
2000-03-07 17:55:32 +00:00
Guido van Rossum ba23bed340 Tweak the goto file/line command (in the right button menu in PyShell
and output windows) so that it if it doesn't succeed with the line
at the cursor, it tries the line before that.  This is handy with
tracebacks, where my natural tendency is to click in the displayed
source line rather than in the file/line indicator just above it.
Now I can indulge this tendency.

I factored out a helper and changed the error handling so that a
non-existing file is treated as if the line didn't match -- this is
handy because some function calls (e.g. "foo.bar(1)") match the grep
pattern.
2000-03-07 16:25:11 +00:00
Guido van Rossum 801296c3b9 Added a bunch of TODO items that recently came up in the idle-dev list.
Also removed a bunch of items
2000-03-07 15:17:53 +00:00
Guido van Rossum fd6315ec7f If we're in the current input and there's only whitespace beyond the
cursor, erase that whitespace first.  This avoids a particularly
confusing case where hitting Return at the end of the command didn't
do what it was expected to do -- because it wasn't considered to be at
the end of the command.  Now it is.
2000-03-07 15:05:50 +00:00
Jeremy Hylton 0c3208aa62 compiler command-line interface moved here from compiler.pycodegen 2000-03-06 19:13:21 +00:00
Jeremy Hylton f728f9a13e import compile function form pycodegen 2000-03-06 19:12:33 +00:00
Jeremy Hylton 7fab23e9cb rename compile.py to pycodegen.py
fix imports
remove parse functions and visitor code
track name change: Classdef to Class

add some comments and tweak order of visitXXX methods

get rid of if __name__ == "__main__ section
2000-03-06 19:10:54 +00:00
Jeremy Hylton 8c78341f45 add a doc string
import some useful functions from contained modules
2000-03-06 19:04:14 +00:00
Jeremy Hylton 9812e7bc6a fix import to refer to compiler package 2000-03-06 18:54:30 +00:00
Jeremy Hylton abd7ebf70b revise arguments for addCode method on lnotab. take several numbers
that are internally converted to chars, rather than taking a string.
2000-03-06 18:53:14 +00:00
Jeremy Hylton fa974a9d06 change node Classdef to Class
add doc string to transformer module
add two helper functions:
    parse(buf) -> AST
    parseFile(path) -> AST
2000-03-06 18:50:48 +00:00
Jeremy Hylton ed9586174d factor out the tree walking/visitor code that was in compile.py 2000-03-06 18:49:31 +00:00
Guido van Rossum 9cb083b957 Defer all the work to idle.py, which has recently become too
complicated to copy in-line here.
2000-03-06 17:16:05 +00:00
Guido van Rossum 7f3cfd50fa In getdef(), don't die when the section doesn't exist. 2000-03-06 14:43:20 +00:00
Guido van Rossum 074d6e1f56 Don't use 1.6-isms (s.startswith()) -- we want to distribute this
before 1.6 is out so it has to be compatible with 1.5.2.
2000-03-06 14:16:41 +00:00
Jeremy Hylton 272cbb4974 superceded by IdleConf/config.txt 2000-03-03 23:08:09 +00:00
Jeremy Hylton e81f28b630 migrate to use of IdleConf and config files to set options
idle.py:
    Load the config files before anything else happens
    XXX Need to define standard way to get files relative to the
       IDLE install dir

PyShell.py:
ColorDelegator.py:
    Get color defns out of IdleConf instead of IdlePrefs

EditorWindow.py:
    Replace hard-coded font & window size with config options
    Get extension names via IdleConf.getextensions

extend.py:
   Obsolete.  Extensions defined in config file.

ParenMatch.py:
   Use config file for extension options.
   Revise comment about parser requirements.
   Simplify logic on find returning None.
2000-03-03 23:06:45 +00:00
Jeremy Hylton 583abb8027 default to cwd if os.environ['HOME'] does not exist 2000-03-03 23:00:41 +00:00
Jeremy Hylton daca630e40 a ConfigParser for idle and three configuration files 2000-03-03 22:57:42 +00:00
Guido van Rossum 9428fa607b Patch by Tim Peters:
Changes the one regexp in PyParse capable of making the re module blow the C
stack when passed unreasonable <0.9 wink> program text.  Jeremy Hylton
provoked this with a program of the form:

x = (1,
     2,
... # 9997 lines deleted here
     10000,
)

Programs "like this" will no longer (no matter how many lines they contain)
trigger re death.  OTOH, you can now make another class of unreasonable
program that will take much longer to parse.
2000-03-03 14:51:11 +00:00
Jeremy Hylton 63c2b250ef paren matching extension. warning: in current version of IDLE, can
not run this extension and CallTips extension at the same time.
2000-03-02 19:06:57 +00:00
Guido van Rossum 1b6d21bb3e Correct type error in getopt.error handling code. 2000-02-29 13:08:44 +00:00
Guido van Rossum aacf5ce1ad Script by Tim Peters to discover illegal append() calls. 2000-02-29 13:05:49 +00:00
Guido van Rossum 67dd17f730 Fix multi-arg append(). 2000-02-29 13:00:16 +00:00
Barry Warsaw 7733e12c9c Two buglet fixes. Peter Funk caught the bug in make_escapes:
This will fold all ISO 8859 chars from the upper half of the
    charset into the lower half, which is ...ummm.... unintened.

The second is a typo in the reference to options.escape in main().
2000-02-27 14:30:48 +00:00
Barry Warsaw c8f0892d12 Changes submitted by Peter Funk (some fixes/additions by B.Warsaw) to
make pygettext more compatible with GNU xgettext, specifically:

Added -E/--escape for allowing pass-thru of iso8859-1 characters above
7 bits.

Added -o/--output option for renaming the output file from
messages.pot (there's overlap with -d/--default-domain, but GNU
xgettext has them both).

Added -p/--output-dir for specifying the output directory for
messages.pot.

Added -V/--version for printing the version number.

Added -w/--width for specifying the output page width (this is because
now pygettext, like GNU xgettext will put several locations on the
same line to cut down on vertical space).

Added -x/--exclude-file for specifying a list of strings that are not
to be extracted from the input files.

Bumped version number to 1.0

Try to import fintl and use fintl.gettext as _ if available.  Fall
back is to use identity definition of _().

Moved the escape creation to a function make_escapes() so that its
behavior can be controlled by the -E option.

__openseen(): Support the -x option.

write(): Support -w option and vertical space preserving feature.

main(): Support new options.
2000-02-26 20:56:47 +00:00
Guido van Rossum 6e0a28f6cf Deleting tabpolice.py; it was superceded by tabnanny.py long ago. 2000-02-23 15:34:43 +00:00
Guido van Rossum a02c898e69 Moved tabnanny.py to standard library status. 2000-02-23 15:33:52 +00:00
Guido van Rossum dc6883365b Added tabnanny.py, by Tim Peters, formerly from Tools/scripts, to the
standard library.  Added some comments:

# XXX Note: this is now a standard library module.
# XXX The API needs to undergo changes however; the current code is too
# XXX script-like.  This will be addressed later.
2000-02-23 15:32:19 +00:00
Guido van Rossum 8c95c27c4c Added a new command: Check module (Alt-F5) It does a full syntax check
of the current module.  It also runs the tabnanny to catch any
inconsistent tabs.

Also did a little bit of refactoring: added an errorbox() method to
simplify the display of error dialogs.
2000-02-22 00:19:58 +00:00
Jeremy Hylton 772dd417f7 satisfy the tabnanny (thanks to MH for noticing the problem) 2000-02-21 22:46:00 +00:00
Jeremy Hylton efd0694a2d changes to _lookupName
- removed now (happily) unused second arg
- need to verify results of [].index are correct; for building consts,
  need to have same value and same type, e.g. 2 not the same as 2L
2000-02-17 22:58:54 +00:00
Jeremy Hylton 3ec7e2c4be the previous quick hack to fix def foo((x,y)) failed on some cases
(big surprise).  new solution is a little less hackish.

Code gen adds a TupleArg instance in the argument slot. The tuple arg
includes a copy of the names that it is responsble for binding.  The
PyAssembler uses this information to calculate the correct argcount.

all fix this wacky case: del (a, ((b,), c)), d
which is the same as: del a, b, c, d
(Can't wait for Guido to tell me why.)

solution uses findOp which walks a tree to find out whether it
contains OP_ASSIGN or OP_DELETE or ...
2000-02-17 22:09:35 +00:00
Jeremy Hylton 7708d697ee add varargs and kwargs flags to Lambda nodes 2000-02-17 22:06:20 +00:00
Jeremy Hylton 873bdc18e4 satisfy the tabnanny
fix broken references to filename var in generateXXX methods
2000-02-17 17:56:29 +00:00
Guido van Rossum 99aabe30ce Add primitive customization of window size and font.
A few alternative selections can be made by changing "if 0" to "if 1".
2000-02-17 16:14:16 +00:00
Guido van Rossum 44cf8ef521 The 0.5 release happened on 2/15, not on 2/14. :-) 2000-02-16 01:22:35 +00:00
Jeremy Hylton ad9a86fb1c support for arglists with implicit tuple unpacks
- added a number of support methods to generate code just before the
  body
- hack protocol for communicating number of args to PyAssembler

fix TryExcept generation for case where exception handler has no body
fix visitAssAttr
add comment about incomplete visitAssName

stop using the ExampleASTVisitor

change script invocation to accept a list of .py files (e.g. Lib/*.py)
2000-02-16 00:55:44 +00:00
Jeremy Hylton 3d9f5e4de2 more robust assignment of lineno for keyword args
get the lineno from the name of the keyword arg

example of case that didn't work--
def foo(x, y, a = None,
	b = None):
2000-02-16 00:51:37 +00:00
Jeremy Hylton 2ce27b223b fix argcount generation for arg lists containing tuple unpacks
this is sort of a hack
2000-02-16 00:50:29 +00:00
Jeremy Hylton 65d4ea05d2 add flatten helper function 2000-02-16 00:49:47 +00:00
Jeremy Hylton 4f6bcd80fc finish first impl of code generator
add support for nodes TryExcept, TryFinally, Sliceobj
fix visitSubscript to properly handle x[a,b,c]
2000-02-15 23:45:26 +00:00
Jeremy Hylton 1ebba96871 fix creation of Ellipsis node 2000-02-15 23:43:19 +00:00
Jeremy Hylton 410e840c85 add a little debugging support when new.code raises SystemError 2000-02-15 21:59:50 +00:00
Jeremy Hylton d603dee4a3 add line numbers to nodes in the except clause (when possible) 2000-02-15 21:30:48 +00:00
Jeremy Hylton ca1ad182f2 tidy up tryexcept and tryfinally nodes 2000-02-15 21:30:00 +00:00
Guido van Rossum 6e83cacb18 A bit restructured. 2000-02-15 19:11:26 +00:00
Guido van Rossum dec0b68d68 Oops, somehow the initial checkin was botched. :-( 2000-02-15 18:30:58 +00:00
Guido van Rossum 83d4657a06 Added some clarifications. 2000-02-15 18:20:28 +00:00
Guido van Rossum 90ad8589b1 Temporarily add a copy here for easy distribution. 2000-02-15 18:20:01 +00:00
Guido van Rossum 17ae233edc More changes. 2000-02-15 18:11:21 +00:00
Guido van Rossum 1d841fec12 Notice status back and stack viewer. 2000-02-15 18:08:19 +00:00
Guido van Rossum ec73dc6700 Support for Moshe's status bar. 2000-02-15 18:05:15 +00:00
Guido van Rossum 17752f7c4b Status bar code -- by Moshe Zadka. 2000-02-15 18:04:52 +00:00
Guido van Rossum 2bb8e72046 Adding the old stack viewer implementation back, for the debugger. 2000-02-15 18:04:09 +00:00
Guido van Rossum b658469873 New stack viewer, uses a tree widget.
(XXX: the debugger doesn't yet use this.)
2000-02-15 18:03:40 +00:00
Guido van Rossum 553fa4432a Correct a typo and remove an unqualified except that was hiding the error. 2000-02-15 18:03:01 +00:00
Guido van Rossum f801f3b05c Add an XXX comment about the ClassBrowser AIP. 2000-02-15 18:02:11 +00:00
Guido van Rossum 0b5b2c89d7 Updated change log. 2000-02-15 17:19:25 +00:00
Guido van Rossum 46ffbecf94 News update. Probably incomplete; what else is new? 2000-02-15 17:17:58 +00:00
Guido van Rossum 6d3be50653 Updated for pending IDLE 0.5 release (still very rough -- just getting
it out in a more convenient format than CVS).
2000-02-15 17:16:40 +00:00
Guido van Rossum b4b8381f4f Tiny addition. 2000-02-15 17:15:36 +00:00
Jeremy Hylton 9e1cd688b5 edit a doc string
(real intent is to test out rsync install)
2000-02-14 23:57:56 +00:00
Jeremy Hylton a46fb3841b get rid of spurious print 2000-02-14 21:54:57 +00:00
Guido van Rossum 967e509a81 Patch by Gerrit Holl:
* In crlf.py and lfcr.py: regsub -> re
2000-02-14 21:42:14 +00:00
Guido van Rossum d962878309 Patch by Gerrit Holl:
* In logmerge.py: added '-r' flag to show the oldest checkin
      first instead of the newest, and getopt.getopt was used
      wrong.
2000-02-14 21:41:50 +00:00
Jeremy Hylton 126960b744 looks like everything is working except for try/except (pystone
compiles correctly)
2000-02-14 21:33:10 +00:00
Jeremy Hylton 17988d2a17 LeftShift & RightShift: fix reprs, change attr names to left and right
(so they are common with other binary ops)
2000-02-14 21:32:42 +00:00
Jeremy Hylton bf6267e6f8 rename several of the generic attribute names for nodes. new node attrs are:
Exec: expr, locals, globals
Dict: items
Assert: test, fail
2000-02-14 18:34:11 +00:00
Jeremy Hylton 42907790b6 (), [], and {} should not be represented as constant expressions, they
should be calls to BUILD_ ops for these types with no arguments
2000-02-14 18:32:46 +00:00
Jeremy Hylton a50581228e split compile.py into two files
add StackDepthFinder (and remove push/pop from CodeGen)
add several nodes, including Ellipsis, Bit&|^, Exec
2000-02-14 14:14:29 +00:00
Jeremy Hylton 3050d51571 change MODULE_NAMESPACE/FUNCTION_NAMESPACE stuff to have a single flag
named OPTIMIZED, which matches compile.c and makes more sense for
classes

revamp call signature for PythonVMCode.__init__; doesn't really matter
'cuz this code is going to be refactored out of existence

add generateClassCode and modify Func & Lambda generation

add support for nodes Classdef, Keyword,

fix CallFunc to generate right op arg when calling w/ keywords

add ugly hack to properly compute offsets when the same stack ref is
used multiple times
2000-02-12 00:12:38 +00:00
Jeremy Hylton 76d01b820c add support for Lambda nodes
change resolution of local name ops (LOAD_FAST).  i think it makes
sense now.  if it is an argument or a local var name that it used, it
must be in varnames.  if it is a local var name that is used, it must
also be in names
2000-02-11 20:27:07 +00:00
Jeremy Hylton 4eb504c2af add loop handling via
Loop object to handle StackRegs
loops stack attr on CodeGenreeator to hold the current loop object

add support for nodes While, Break, Continue
2000-02-10 20:55:50 +00:00
Jeremy Hylton 95b8614353 add an __len__ to Set and Stack 2000-02-10 20:54:27 +00:00
Jeremy Hylton 3e0910c10c add namespace attr to CodeGenerator, can be either MODULE_NAMESPACE or
FUNCTION_NAMESPACE.  initialize in __init__ and reset in
generateFunctionCode.

replace direct issue of STORE_FAST, STORE_GLOBAL, etc. with call to
storeName; same for loadName and deleteName

the new {store,load,delete}Name methods use the namespace attr and the
local variable stack to determine the correct bytecode to issue
2000-02-10 17:20:39 +00:00
Jeremy Hylton 5e0ce53e0e add ExampleASTVisitor:
* prints out examples of nodes that are handled by visitor.  simply a
  development convenience

remove NestedCodeGenerator -- it was bogus after all
replace with generateFunctionCode, a method to call to generate code
  for a function instead of a top-level module

fix impl of visitDiscard (most pop stack)
emit lineno for pass

handle the following new node types: Import, From, Getattr, Subscript,
Slice, AssAttr, AssTuple, Mod, Not, And, Or, List

LocalNameFinder: remove names declared as globals for locals

PythonVMCode: pass arg names to constructor, force varnames to contain
them all (even if they aren't referenced)

add -q option on command line to disable stdout
2000-02-10 00:47:08 +00:00
Jeremy Hylton 69926eaee0 add remove method to set 2000-02-10 00:43:22 +00:00
Jeremy Hylton 402456020b add optional verbose arg to walk function. it overrides the global
VERBOSE setting for the ASTVisitor

add getopt handling for one or more -v args

rename ForwardRef to StackRef, because it isn't necessarily directional

CodeGenerator:
* add assertStackEmpty method.  prints warning if stack is not empty
  when it should be
* define methods for AssName, UNARY_*, For

PythonVMCode:
* fix mix up between hasjrel and hasjabs for address calculation
2000-02-08 21:15:48 +00:00
Jeremy Hylton 156a975476 make all unary operators have a single child node called expr 2000-02-08 21:06:19 +00:00
Jeremy Hylton 1851901a05 add spaces to comparison names is not and not in to match dis 2000-02-08 19:58:33 +00:00
Jeremy Hylton 53187f32eb now produces valid pyc files for a least a trivial subset of the
language.

CodeGenerator:
* modify to track stack depth
* add emit method that call's PythonVMCode's makeCodeObject
* thread filenames through in hackish way
* set flags for code objects for modules and functions
  XXX the docs for the flags seem out of date and/or incomplete

PythonVMCode:
* add doc string describing the elements of a real code object

LineAddrTable:
* creates an lnotab (no quite correctly though)
2000-02-08 19:01:29 +00:00
Jeremy Hylton aa9d2d6123 constants from transformer 2000-02-08 18:57:51 +00:00
Jeremy Hylton 9605c11c4c move constants out of transformer so that they can be shared with ast
add varargs and kwargs attributes to Function nodes
2000-02-08 18:57:32 +00:00
Jeremy Hylton 0fdffcf916 rapid evolution towards producing real .pyc files (even though I don't
handle most of the language syntax yet)

create NestedCodeGenerator used to generator the separate code object
that needs to be passed as an argument to MAKE_FUNCTION when a def
stmt is found (probably useful for class too)

change CodeGenerator.visitFunction to use the NestedCG

add CompiledModule class to handle creation of .pyc (pretty minimal
for now)

add makeCodeObject method to PythonVMCode that replaces symbolic names
with indexes into slots of the code code.  the design of this
class will probably need to be revised.
2000-02-04 19:37:35 +00:00
Jeremy Hylton 8b6323d3ef checking in initial weekend's work
compile.py: ASTVisitor framework plus bits of a code generator that
    should be bug-for-buf compatible with compile.c

misc.py: Set and Stack helpers

test.py: a bit of simple sample code that compile.py will work on
2000-02-04 00:28:21 +00:00
Jeremy Hylton 106a02da94 make p2c a package 2000-02-04 00:25:34 +00:00
Jeremy Hylton f968e8545d three files from the p2c cvs tree. the message here indicates the
revision number the p2c cvs tree.

COPYRIGHT: 1.1
ast.py: 1.3
transformer.py: 1.11
2000-02-04 00:25:23 +00:00
Guido van Rossum f158887505 Two patches from Jack Jansen:
Three bgen mods:
- support for FSSpecs passed-by-value and points-passed-by-reference added.
- strip single-line comments when parsing header files
- if a definition is blacklisted _do_ output it, but in comment
2000-01-20 20:49:28 +00:00
Barry Warsaw 8f35681843 Added \" to escapes so embedded escaped double quotes are handled
correctly.  Patch suggested by Mads Kiilerich <mk@solit.dk>.
1999-12-06 02:46:49 +00:00
Guido van Rossum 4755ee567d Complete the integration of Sam Bayer's fixes. 1999-11-17 15:41:47 +00:00
Guido van Rossum 497a19879d Changed fron importing wcnew back to webchecker. 1999-11-17 15:40:48 +00:00
Guido van Rossum e284b21457 Integrated Sam Bayer's wcnew.py code. It seems silly to keep two
files.  Removed Sam's "SLB" change comments; otherwise this is the
same as wcnew.py.
1999-11-17 15:40:08 +00:00
Guido van Rossum 61b95db389 # *NOT* by Sam Bayer: reindented to use 4 spaces like the rest here,
# and removed trailing whitespace.
1999-11-17 15:13:21 +00:00
Guido van Rossum 64acb5ce93 Samuel L. Bayer:
- same trick with "import wcnew; webchecker = wcnew" as above
- updated readhtml() method to handle pair representation; used
  new name suppression infrastructure from wcnew.py to suppress
  processing name anchors

[And untabified --GvR]
1999-11-17 15:04:26 +00:00
Guido van Rossum a8946406df Samuel L. Bayer:
- added -t and -a arguments
- added "import wcnew; webchecker = wcnew" in place of "import
  webchecker" (I assume that if you're happy with the changes, you'll
  just replace webchecker.py with wcnew.py, but if I were to do that,
  the diffs would be incomprehensible)
- fixed buggy -v argument (I think you got out of sync with the
  way verbosity was handled in webchecker vs. wcgui between 1.5 and
  1.5.2)
- made -v actually do something by adding a call to c.setflags()
  (probably the same problem as above)
- updated references to URLs to accommodate wcnew.py's pair
  representation; added appropriate calls to format_url() to handle
  display; added argument to ListPanel() initialization to provide
  access to format_url()

[And untabified --GvR]
1999-11-17 15:03:52 +00:00
Guido van Rossum f97eecccb7 Samuel L. Bayer:
- same fixes from webchecker.py
- incorporated small diff between current webchecker.py and 1.5.2
- fixed bug where "extra roots" added with the -t argument were being
  checked as real roots, not just as possible continuations
- added -a argument to suppress checking of name anchors

[And untabified --GvR]
1999-11-17 15:02:53 +00:00
Guido van Rossum dbd5c3e63b Samuel L. Bayer:
- forced new done origins to set errors if they're in self.bad (fixes
  bug where only the first of a number of errorful references to a
  link is reported under some circumstances)
- suppressed adding duplicates to self.todo list (cleans up printout
  in wcgui details)
1999-11-17 15:00:14 +00:00
Barry Warsaw 5dbf526e8e Several improvements, some of where were contributed by Bernhard
Herzog <herzog@online.de>.  Specifically,

--verbose/-v flag added

pot_header added to make msgmerge and Emacs po-mode work better

normalize(), escape(), safe_eval(): Improved normalization of strings
for more .po file compatibility (e.g. C style).  Handles emmbedded
newlines better.

Also added an identity function called _() and use it in the file
where messages are printed.  This allows us to selftest pygettext.py
with itself as input.
1999-11-03 18:47:52 +00:00
Barry Warsaw a507c32991 Python equivalent of xgettext(1). This was originally released
separately but now is included in the standard Python distribution.
1999-11-03 16:46:05 +00:00
Guido van Rossum 8b4b46e4f3 Fix a bug reported by Toby Dickenson (on 18 May 1999).
Sometimes there's no parent, so don't try to get its __name__.
1999-11-02 15:46:44 +00:00
Guido van Rossum cfd76a202b Sjoerd Mullender:
Added some declarations to shut up compiler.
1999-11-02 15:44:40 +00:00
Barry Warsaw c4eb6a6afd main(): Arg! I wasn't properly ignoring EINVAL; now only re-raise the
exception if code <> errno.EINVAL.  Jeremy this should fix your
problem.
1999-10-07 20:00:01 +00:00
Guido van Rossum fa968ac35b Patches by Jack Jansen: new type OptionalInBuffer allows
passing either a string/input buffer or None.
1999-09-30 14:15:14 +00:00
Guido van Rossum 8bd738278e Patch by Jack Jansen to add with_ifdef option, which places #ifndef
around external decls.
1999-09-30 14:12:44 +00:00
Barry Warsaw d8d179d69d main(): wrap the device.setinfo() call around an exception handler.
It's possible to get a sunaudiodev.error (errno == EINVAL), although
I'm not exactly sure why, this at least won't crash the application.
1999-09-22 15:45:51 +00:00
Guido van Rossum 7f2c9d3890 A few new TODO entries. 1999-09-09 14:16:02 +00:00
Guido van Rossum 7f1fdfcdaf Add Python Documentation entry to Help menu. 1999-08-26 23:06:22 +00:00
Guido van Rossum 416b961be8 Find the help.txt file relative to __file__ or ".", not in sys.path.
(Suggested by Moshe Zadka, but implemented differently.)

Add <<python-docs>> event which, on Unix, brings up Netscape pointing
to http://www.python.doc/current/ (a local copy would be nice but its
location can't be predicted).  Windows solution TBD.
1999-08-26 23:06:05 +00:00
Guido van Rossum a8b37ad9ff Scrit by Marc-Andre Lemburg to generate htmlentitydefs.py. 1999-08-19 16:00:41 +00:00
Barry Warsaw 8a07baef80 Bump to version 1.1 1999-08-18 20:18:20 +00:00
Barry Warsaw 772d69676e __update(): Jeremy Hylton reports occurances of sunaudiodev.error
(interrupted system call) when getting the device information.  I've
never seen it, but this patch should take care of the problem.

If we get that exception and we're polling, just return since we'll
wake up again soon and get the right information.  If we're not
polling, try 4 times and then give up.
1999-08-18 20:17:42 +00:00
Barry Warsaw e27db5a393 Initial implementation 1999-08-13 20:59:48 +00:00
Barry Warsaw af5725104b Initial revision 1999-08-11 21:40:38 +00:00
Guido van Rossum aa6ed0c341 Moshe noticed an inconsistency in his comment, so I'm rephrasing it to
be clearer.
1999-08-11 14:55:43 +00:00
Guido van Rossum 292f2c53da Patch inspired by Moshe Zadka to search for the Icons directory in the
same directory as __file__, rather than searching for it along sys.path.
This works better when idle is a package.
1999-08-11 02:01:00 +00:00
Guido van Rossum a74c55662f Mark Hammond writes:
"""
If the filename being complained about contains a space, enclose the
file-name in quotes.

The reason is simply that when I try and parse tabnanny's output, filenames
with spaces make it very difficult to determine where the filename stops
and the linenumber begins!
"""

Tim approves.

I slightly changed the patch (use 'in' instead of string.find()) and
arbitrarily bumped the __version__ variable up to 6.
1999-07-30 17:48:20 +00:00
Guido van Rossum aba953eceb New wishes. 1999-07-15 13:11:02 +00:00
Guido van Rossum 0d6bac67be Make the color for stderr red (i.e. the standard warning/danger/stop
color) rather than green.  Suggested by Sam Schulenburg.
1999-07-10 13:17:35 +00:00
Barry Warsaw 17a8b5d473 make_view_popups(): Catch import error which can occur if a viewer is
dynamically imported when Pynche is running via askcolor out of a
package.  If the ImportError occurs, try again, prepending the package
name and digging out the module.
1999-07-06 22:00:52 +00:00
Guido van Rossum 16e0bab4ab Close debugger when closing. This may break a cycle. 1999-06-25 17:26:34 +00:00
Guido van Rossum ba5a59c834 Break cycle on close. 1999-06-25 17:25:22 +00:00
Guido van Rossum 5af0df528d Destroy the tree when closing. 1999-06-25 17:08:19 +00:00
Guido van Rossum 30455f3050 Add destroy() method to recursively destroy a tree. 1999-06-25 17:07:57 +00:00
Guido van Rossum fed9b914b5 Extend _close() to break cycles.
Break some other cycles too (and destroy the root when done).
1999-06-25 16:09:27 +00:00
Guido van Rossum 205afb487a Add _close() method that does the actual cleanup (close() asks the
user what they want first if there's unsaved stuff, and may cancel).
It closes more than before.

Add unload_extensions() method to unload all extensions; called from
_close().  It calls an extension's close() method if it has one.
1999-06-25 16:06:29 +00:00
Guido van Rossum dd4dda87c1 Add close() method that breaks cycles. 1999-06-25 16:04:38 +00:00
Guido van Rossum 374c0dfb10 Add unregister() method.
Unregister everything at closing.
Don't call close() in __del__, rely on explicit call to close().
1999-06-25 16:03:19 +00:00
Guido van Rossum e689f0087e Add close() method that breaks a cycle. 1999-06-25 16:02:22 +00:00
Guido van Rossum ce7695191f Simplified version of a patch by Chih-Hao Huang, who wrote:
"""
When there are additional Setup files, specified by -e option of freeze,
checkextenstions.py assumes that *.o, *.a, -Lpath, and -Rpath are all
relative to where the Setup file is. select() inserts the path to the
Setup file to make them absolute. However, the assumption is not true.
There are cases that absolute paths are specified for them. The inserted
prefix, by select(), results in error.

The following fix check for absolute paths. The assumption is: an
absolute path begins with either '/' or '$'. In the latter case, it is
from the environmental variable. (Variables defined locally in the Setup
file have already been handled by expandvars())
"""

My version of the patch has been verified by Charles Waldman (a
colleague of Chih-Hao).
1999-06-23 21:37:57 +00:00
Guido van Rossum 43128905be Patch submitted by Toby Dickenson and approved by Mark Hammond.
Toby writes:

winmakemakefile.py tries to allow for spaces in the python install
path, by adding quotes around the appropriate filenames. It doesn't
quite get this correct; sometimes the quotes end up in the middle of
the path.

Microsoft's NMAKE version 6.0 is happy with this (!!!!)  unless there
is also a space in the name. I guess most users of freeze on windows
do not use the same path as the binary distribution.

I've tested the following changes on systems with and without a space
in the path.
1999-06-21 22:36:53 +00:00