Georg Brandl
74bbc79d10
Replace all map(None, a) with list(a).
2008-07-18 19:06:13 +00:00
Martin v. Löwis
8718459f0f
Patch #1513695 : New turtle module, with demos.
2008-06-04 06:29:55 +00:00
Brett Cannon
2ee0e8eaec
Revert the renaming of repr to reprlib.
2008-05-23 05:03:59 +00:00
Alexandre Vassalotti
50a1acb2ab
Changed references to the reprlib module to use its new name.
2008-05-16 06:58:49 +00:00
Benjamin Peterson
5b63acd31e
#2503 make singletons compared with "is" not == or !=
...
Thanks to Wummel for the patch
2008-03-29 15:24:25 +00:00
Georg Brandl
c76ea27965
Use os.closerange().
2008-02-23 22:14:02 +00:00
Mark Dickinson
900b783526
Remove reference to Rational
2008-02-10 19:23:36 +00:00
Jeffrey Yasskin
d7b00334f3
Add rational.Rational as an implementation of numbers.Rational with infinite
...
precision. This has been discussed at http://bugs.python.org/issue1682 . It's
useful primarily for teaching, but it also demonstrates how to implement a
member of the numeric tower, including fallbacks for mixed-mode arithmetic.
I expect to write a couple more patches in this area:
* Rational.from_decimal()
* Rational.trim/approximate() (maybe with different names)
* Maybe remove the parentheses from Rational.__str__()
* Maybe rename one of the Rational classes
* Maybe make Rational('3/2') work.
2008-01-15 07:46:24 +00:00
Christian Heimes
c756d00cf2
Replaced import of the 'new' module with 'types' module and added a deprecation warning to the 'new' module.
2007-11-27 21:34:01 +00:00
Guido van Rossum
41f039292f
A thread-less variant of brownian.py, submitted by Michele Simoniato.
2007-11-26 22:16:49 +00:00
Neal Norwitz
25e4461666
Remove references to stdwin which was removed long ago.
2007-05-13 20:54:19 +00:00
Tim Peters
35c7bb202f
Whitespace normalization.
2007-04-25 18:47:18 +00:00
Georg Brandl
124df8398d
Patch #1683328 : fixes and enhancements for "unparse" demo.
2007-03-19 19:02:48 +00:00
Georg Brandl
2756278304
Patch #1552024 : add decorator support to unparse.py demo script.
2006-10-27 20:39:43 +00:00
Martin Blais
215f13dd11
Normalized a few cases of whitespace in function declarations.
...
Found them using::
find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done
find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done
(I was doing this all over my own code anyway, because I'd been using spaces in
all defs, so I thought I'd make a run on the Python code as well. If you need
to do such fixes in your own code, you can use xx-rename or parenregu.el within
emacs.)
2006-06-06 12:46:55 +00:00
Andrew M. Kuchling
9fef9b166e
Add more whitespace; use a better socket name
2006-06-03 23:59:36 +00:00
Andrew M. Kuchling
46df918314
Remove dangling reference
2006-06-03 23:51:21 +00:00
Andrew M. Kuchling
84b9cbc79a
Remove xmlrpc/ directory
2006-06-03 23:47:22 +00:00
Andrew M. Kuchling
65ff561b50
Remove xmlrpc demo -- it duplicates the SimpleXMLRPCServer module.
2006-06-03 23:46:36 +00:00
Andrew M. Kuchling
7b1ddca380
This demo requires Medusa (not just asyncore); remove it
2006-06-03 23:43:22 +00:00
Andrew M. Kuchling
0b4e554be5
Use functions; modernize code
2006-06-03 23:39:07 +00:00
Andrew M. Kuchling
3550613502
Put code in a main() function; loosen up the spacing to match current code style
2006-06-03 23:15:56 +00:00
Andrew M. Kuchling
3725dea9c3
Docstring fix; use True
2006-06-03 23:09:58 +00:00
Andrew M. Kuchling
311562ac75
Use true division, and the True value
2006-06-03 23:07:21 +00:00
Andrew M. Kuchling
98900bc7bb
Use True; value returned from main is unused
2006-06-03 23:02:15 +00:00
Andrew M. Kuchling
510b46fb42
Some code tidying; use curses.wrapper
2006-06-03 22:59:59 +00:00
Andrew M. Kuchling
6f159b1def
Drop 0 parameter
2006-06-03 22:59:23 +00:00
Andrew M. Kuchling
08bcfc2331
Update readme
2006-06-03 22:44:42 +00:00
Tim Peters
3daf304f3b
Whitespace normalization.
2006-04-10 20:28:40 +00:00
Martin v. Löwis
3fa6c090d8
Patch #1441452 : Add more AST nodes.
2006-04-10 12:43:55 +00:00
Martin v. Löwis
b04dee935c
Patch #1462222 : Fix Tix.Grid. Closes #1036406 .
2006-04-10 08:34:21 +00:00
Neal Norwitz
10be10cbe7
Remove regsub, reconvert, regex, regex_syntax and everything under lib-old.
2006-03-16 06:50:13 +00:00
Martin v. Löwis
87a8b4fee5
unparse.py can now unparse itself.
2006-02-28 21:41:30 +00:00
Tim Peters
400cbc3a44
Set EOL style to native.
2006-02-28 18:44:41 +00:00
Tim Peters
710ab3b5f8
Whitespace normalization.
2006-02-28 18:30:36 +00:00
Martin v. Löwis
5fec904f84
Start of a source code unparser.
2006-02-27 21:41:03 +00:00
Neal Norwitz
286d74764e
SF Bug #1348477 , regextest can't be pydoc'ed. Will backport.
2005-11-09 07:07:58 +00:00
Martin v. Löwis
ab0f947a21
Remove .cvsignore files, as they live in svn:ignore
...
properties now.
2005-10-30 22:01:41 +00:00
Georg Brandl
3e98736e76
Minor spelling nit.
2005-08-25 20:41:38 +00:00
Michael W. Hudson
0e21be71da
Update version.
...
I wonder if there's a way to fix this Makefile to be slightly less
totally unreliable.
2005-06-15 11:46:27 +00:00
Hye-Shik Chang
f2dbeff60b
Fix HTTP method handler example so that method names in uppercases
...
can be processed. (Submitted by Jooncheol Park)
2005-04-12 02:49:52 +00:00
Raymond Hettinger
c672f8c377
SF patch 1179503: Fix typos in rpc.py
...
* Call to unpack_int() should have no arguments
* Misspelled BadRPCVerspion exception
* Replace <> with !=
2005-04-10 16:21:07 +00:00
Raymond Hettinger
bdaad8c939
* Fix error in definition of Im() which returned self instead of 0
...
for non-complex arguments.
* Replace type() comparisons with isinstance() checks.
* Replace apply() calls with equivalent syntactic form.
* Simplify __hash__ definition to hash the underlying tuple.
* Use math.hypot() for more robust computation of __abs__().
* Use sorted() instead of the multi-step keys/sort/iter.
* Update comment on the cmath module.
2005-04-09 14:55:07 +00:00
Martin v. Löwis
4a1e48c566
Patch #1177597 : Correct various bugs, add comments.
2005-04-09 10:51:19 +00:00
Guido van Rossum
75b64e65f1
Use decorators.
2005-01-16 00:16:11 +00:00
Johannes Gijsbers
7a8c43ee6a
Add 'if __name__ == "__main__":' to files already as a usable as a module.
2004-09-11 16:34:35 +00:00
Andrew M. Kuchling
6a507a104d
Remove mpzpi demo
2004-08-31 13:42:11 +00:00
Tim Peters
68a323c5d8
Whitespace normalization. Had to break guido's lock on rev 1.1 to do
...
this, but I'm sure it wasn't locked intentionally.
2004-07-18 16:56:37 +00:00
Tim Peters
182b5aca27
Whitespace normalization, via reindent.py.
2004-07-18 06:16:08 +00:00
Tim Peters
e6ddc8b20b
Whitespace normalization. Ran reindent.py over the entire source tree.
2004-07-18 05:56:09 +00:00
Andrew M. Kuchling
0ec0b725ae
Fix comment typo
2004-07-17 14:44:17 +00:00
Brett Cannon
c2b151c66e
Add code for a range function that uses generators.
...
Cleaned up existing code by abstracting code to parse arguments. Also removed
any unneeded operations (such as calling 'int' on a division when using floor
division also works). Fixed a bug where the values returned by
OldStyleRange could be short by one value. Added more documentation.
Testing code also has a basic sanity check.
2004-06-27 23:17:35 +00:00
Fred Drake
09659fbe69
fix error message; closes SF patch #932796
2004-05-12 03:15:07 +00:00
Walter Dörwald
70a6b49821
Replace backticks with repr() or "%r"
...
From SF patch #852334 .
2004-02-12 17:35:32 +00:00
Raymond Hettinger
bbd290ab8d
Revert previous change which didn't make sense the next day :-)
2003-12-10 15:22:23 +00:00
Raymond Hettinger
e807da807c
Update to use python ints and int/long unification.
2003-12-10 01:58:52 +00:00
Walter Dörwald
f0dfc7ac5c
Fix a bunch of typos in documentation, docstrings and comments.
...
(From SF patch #810751 )
2003-10-20 14:01:56 +00:00
Raymond Hettinger
fe63faaeeb
SF patch #803449 : modernize demo scripts
...
(Contributed by George Yoshida.)
2003-09-10 21:12:59 +00:00
Skip Montanaro
9463792c68
To be a good citizen, it should really delete its socket when done.
2003-08-01 14:20:02 +00:00
Martin v. Löwis
7890c26508
Patch #748846 : Let Demo/classes/Date.py mention DateTime module.
2003-06-07 19:39:56 +00:00
Martin v. Löwis
bb640c15a1
Patch #748849 : Update to current tools and demos.
2003-06-07 18:46:34 +00:00
Andrew M. Kuchling
e81866e7c6
Remove unneeded continuation chars
2003-04-24 17:27:53 +00:00
Andrew M. Kuchling
f64509e348
Move all the imports to the top; use md5.new()
2003-04-24 17:26:56 +00:00
Andrew M. Kuchling
30dd9bc0bf
Run this demo script through reindent.py; output has been verified to remain the same
2003-04-24 17:26:22 +00:00
Andrew M. Kuchling
9b12d9d0d2
Modernize the code a bit:
...
use re module
make chomp() use rstrip()
2003-04-24 17:22:04 +00:00
Andrew M. Kuchling
b7878d09e5
Modernize the code a bit:
...
use re module
use .split() string method
Doesn't use 'for line in sys.stdin'; that ends up changing its interactive
behaviour.
2003-04-24 17:17:56 +00:00
Andrew M. Kuchling
946c53ed7f
Run these demo scripts through reindent.py to give them 4-space indents. I've verified that their output is unchanged.
2003-04-24 17:13:18 +00:00
Andrew M. Kuchling
4f237b6870
Modernize code by using isinstance() instead of type() checks
2003-04-24 17:04:45 +00:00
Andrew M. Kuchling
64b3c830d4
Avoid TypeError by not comparing complex numbers
2003-04-24 16:59:45 +00:00
Skip Montanaro
2cfc4725d5
add find-uname.py
2003-01-01 20:27:13 +00:00
Skip Montanaro
f2c47114e7
Search for Unicode character names using regular expressions.
2003-01-01 20:26:47 +00:00
Neal Norwitz
d8b5e3fda1
Tix update from Mike Clarkson (maintainer)
2002-12-30 23:52:01 +00:00
Neal Norwitz
731a986dfa
Upgrade to Tix-8.1.4 from Mike Clarkson (the maintainer)
2002-12-10 02:18:49 +00:00
Martin v. Löwis
468742878f
Patch #649184 : Update to tix-8.1.4 RC3.
2002-12-06 10:33:45 +00:00
Neal Norwitz
ac30eadc0d
Sync tixwidgets from Mike Clarkson, a maintainer
2002-11-14 02:44:08 +00:00
Guido van Rossum
065627e15c
Add "select all" by clicking on (0,0) cell.
...
Redo setting the selection and setting the beacon to deal better
with rows or columns -- these are now expressed by range (1, sys.maxint).
2002-11-02 22:18:46 +00:00
Guido van Rossum
bfcd6533e4
Add ESC key binding -- undo current cell editing.
2002-11-02 06:50:05 +00:00
Guido van Rossum
3669242ac9
Major breakthrough in selection -- drag-select multiple cells now
...
works. Also row and column selection works (sort of). The DEL
key deletes the selected rectangle. sys.argv[1] used by test_gui().
2002-11-02 06:25:51 +00:00
Guido van Rossum
69ccfcc8da
Spreadsheet demo that I used in the advanced talk at Linux Lunacy II.
2002-10-28 01:06:37 +00:00
Guido van Rossum
eeb7827cad
Remove reference to deleted 'www' directory.
2002-10-18 18:54:22 +00:00
Guido van Rossum
b50e1dee86
Note lack of speedup. Remove Irix reference. Remove silly extra
...
'/tmp' arg. Change predicate to look for world-writable non-symlink
files.
2002-10-18 18:20:33 +00:00
Guido van Rossum
ecbb0eaa43
Update docs. Remove old classes.doc.
2002-10-18 15:40:13 +00:00
Guido van Rossum
989ea8d4eb
Add description of the cgi directory.
2002-10-18 15:36:31 +00:00
Guido van Rossum
cc44ccccb2
Add description of what's here.
2002-10-18 15:35:42 +00:00
Guido van Rossum
154c08894b
Refactor cmd_view(): move line formatting to a helper method.
2002-10-17 21:43:47 +00:00
Guido van Rossum
9c3848b39b
In cmd_create(), use a redirect directive instead of viewing the page;
...
this avoids resubmitting POST data.
Remove redundant 'Page' from label passed from cmd_new().
2002-10-17 21:41:42 +00:00
Guido van Rossum
3296dcc65d
Remove redundant load() call.
2002-10-17 19:30:39 +00:00
Guido van Rossum
a55dda6773
Grammar repair in comment.
2002-10-17 16:33:40 +00:00
Guido van Rossum
c9776bd8dd
Use tempfile.gettempdir() to get the temp directory rather than
...
hardcoding "/tmp".
2002-10-17 16:26:45 +00:00
Guido van Rossum
f66cccf506
Restructure: move all wiki code into a separate module.
2002-10-17 15:53:02 +00:00
Guido van Rossum
26a1ac462c
Add trailing newline when saving.
2002-10-17 13:34:01 +00:00
Guido van Rossum
48123b266c
Security fixes: reject non-wiki-word page names; set homedir to /tmp.
...
Show errors returned by store().
A few nits.
2002-10-17 11:45:54 +00:00
Guido van Rossum
68077210c2
Some really simple cgi examples. cgi3 is a MiniWiki.
2002-10-16 21:01:27 +00:00
Guido van Rossum
b0c87b956c
Remove the SGI demos. These were all ancient and nobody cared enough.
2002-09-17 20:55:57 +00:00
Guido van Rossum
16aac45fc2
Remove the SGI demos. These were all ancient and nobody cared enough.
2002-09-17 20:36:40 +00:00
Guido van Rossum
3b0a3293c3
Massive changes from SF 589982 (tempfile.py rewrite, by Zack
...
Weinberg). This changes all uses of deprecated tempfile functions to
the recommended ones.
2002-08-09 16:38:32 +00:00
Fred Drake
ead36d7874
- Make number in comment match the targets in that section of the
...
Makefile.
- Update the Python version number so we're using the library built
from the current working sources.
2002-07-25 16:23:21 +00:00
Jeremy Hylton
98013be797
Get the meta class inheritance right.
2002-07-12 15:42:10 +00:00
Jeremy Hylton
1808fbc46d
move make_eiffel_method() out of base metaclass
2002-07-11 21:17:26 +00:00
Jeremy Hylton
a70c3bd2c8
Remove list prenpost. It's not used any longer.
2002-07-11 21:14:14 +00:00