Re: where do I need to tab?

2007-10-19 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: I'm following the python's translation of SICP: http://codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Python:Chapter_1 ... OK, you have a mix of Python 3,0 and current (2.5.1) Python. a = 3 b = a + 1 Fine in all print a + b + (a * b) Fine in all

Organizing Sequential Data (TimeStamps) Overthinking?

2007-10-19 Thread xkenneth
All, Just a quick question. I want to be able to have a data structure that organizes data (timestamps I'm working with) sequentially, so that i can easily retrieve the first x amount of timeStamps without iterating over a list. My thought was to use a binary tree, am i overthinking the

Re: documenting excepetions in Python

2007-10-19 Thread kyosohma
On Oct 19, 10:32 am, [EMAIL PROTECTED] wrote: In python, how do I know what exceptions a method could raise? Do I need to look at the source? I don't see this info in the API docs for any of the APIs I'm using. Thanks in advance for your help. Read the source, run unit tests, etc. If you

Re: dynamic invoke

2007-10-19 Thread Sushant
I did not know about getattr and it is the right thing. getattr seems to be converting string into function pointer and I am just saying that string cannot be used as a function pointer in Python as may be in PHP. I copied the PHP code so I did not replace arrow with dot. Good point :)

Re: write whitespace/tab to a text file

2007-10-19 Thread Bjoern Schliessmann
dirkheld wrote: f=open('/User/home/Documents/programming/python/test.txt','w') for x in range(len(names)): f.write(tags[x]) f.close() Definitely consider the Python tutorial. Also, please provide working code examples. I don't think yours will work ;) names =

Re: Please Help !!!

2007-10-19 Thread Johannes Findeisen
Hello Heiko, On Wed, 2007-10-17 at 11:32 +0200, Heiko Schlierkamp wrote: I need to update the virus program every day with the new dat file from mcafee I would like to us a Bat file to go to the web page and download the dat file automatically to a specific Directory, that I have created, but

Re: dynamic invoke

2007-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2007 11:34:39 +, Nils wrote: Use apply(): http://docs.python.org/lib/non-essential-built-in-funcs.html No, don't use apply. Not only does it not solve the original poster's problem, it is a deprecated function. You shouldn't use it in new code. -- Steven. --

Re: dynamic invoke

2007-10-19 Thread Diez B. Roggisch
Sushant wrote: Python will not allow string to be used a function pointer. It is type unsafe. Best way is to convert string into function pointers manually. if dynamicMethod == 'bar': method = oFoo-bar else: method = oFoo-default method() Sorry to say so, but that answer is

Re: dynamic invoke

2007-10-19 Thread Sushant
Python will not allow string to be used a function pointer. It is type unsafe. Best way is to convert string into function pointers manually. if dynamicMethod == 'bar': method = oFoo-bar else: method = oFoo-default method() On Friday 19 October 2007 7:56 am, Diez B. Roggisch wrote:

write whitespace/tab to a text file

2007-10-19 Thread dirkheld
Hi, I would l like to write some data to a text file. I want to write the data with whitespace or tabs in between so that I create tabular columns like in a spreadsheet. How can I do this in python. (btw, I'm new to python) names = ['John','Steve','asimov','fred','jim'] ## output I would like in

Re: vote for Python - PLEASE

2007-10-19 Thread Luis Zarrabeitia
On Thursday 18 October 2007 22:59, [EMAIL PROTECTED] wrote: but I'd rather that people got the message that they should do more python development work!) Maybe the Python community doesn't need your help. He did try to help, in a morally questionable way, but still in good faith (I

Re: Please Help !!!

2007-10-19 Thread marc wyburn
On Oct 17, 10:32 am, Heiko Schlierkamp [EMAIL PROTECTED] africa.com.na wrote: I need to update the virus program every day with the new dat file from mcafee I would like to us a Bat file to go to the web page and download the dat file automatically to a specific Directory, that I have created,

class vs type

2007-10-19 Thread Colin J. Williams
In Python Types and Objects, Shalabh Chaturvedi says (in the Python 3.0 documentation - New Style Classes) The term class is traditionally used to imply an object created by the class statement. However, classes are now synonymous with types. Built-in types are usually not referred to as

Re: Noob: Loops and the 'else' construct

2007-10-19 Thread Paul Boddie
On 19 Okt, 13:39, Dustan [EMAIL PROTECTED] wrote: On Oct 19, 3:12 am, Thorsten Kampe [EMAIL PROTECTED] wrote: So a for/else loop is exactly the same thing as a for loop with the else clause outside the loop (except for break)? Am I missing something here? It sounds to me like you just

Re: how to iterate over sequence and non-sequence ?

2007-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2007 18:38:06 +0200, stef mientki wrote: I don't have pointers, I've just names (at least I think). Let me explain a little bit more, I want to simulate / debug a user program, the user program might look like this: x = 5 for i in xrange(10): x = x + 1 I

Re: dynamic invoke

2007-10-19 Thread Diez B. Roggisch
Nils wrote: On Oct 19, 12:39 pm, [EMAIL PROTECTED] wrote: Hello, Is there any way (other then eval) to invoke a method by passing method name in a string. It's very simple in php: $oFoo = new Foo(); $dynamiMethod = bar; $oFoo-$dynamiMethod(); Unfortunately I can't find a good solution

Re: dynamic invoke

2007-10-19 Thread Nils
On Oct 19, 12:39 pm, [EMAIL PROTECTED] wrote: Hello, Is there any way (other then eval) to invoke a method by passing method name in a string. It's very simple in php: $oFoo = new Foo(); $dynamiMethod = bar; $oFoo-$dynamiMethod(); Unfortunately I can't find a good solution to do the same

General module name clash problem?

2007-10-19 Thread jipjip
Hello all, just new to python.. Suppose i have a directory only with an empty file pickle.py. In this directory i start the python interpreter and say: import pygame What happens? I get an error message: Traceback (most recent call last): File stdin, line 1, in module File

Re: ConfigParser preserving file ordering

2007-10-19 Thread Frank Aune
On Friday 19 October 2007 03:42:16 Joshua J. Kugler wrote: Have you taken a look at ConfigObj? http://www.voidspace.org.uk/python/configobj.html Yes, but as I said I need functionality present in the standard-library, so sub-classing ConfigParser is the last option really. I was hoping

Re: dynamic invoke

2007-10-19 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): Is there any way (other then eval) to invoke a method by passing method name in a string. It's very simple in php: $oFoo = new Foo(); $dynamiMethod = bar; $oFoo-$dynamiMethod(); Unfortunately I can't find a good solution to do the same thing in python. Does

Re: Convert string to command..

2007-10-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : On Oct 18, 1:38 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Abandoned a écrit : (snip) I'm very confused :( I try to explain main problem... I have a table like this: id-1 | id-2 | value 23 24 34 56 68 66 56 98 32455

Re: how to iterate over sequence and non-sequence ?

2007-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2007 01:24:09 +0200, stef mientki wrote: hello, I generate dynamically a sequence of values, but this sequence could also have length 1 or even length 0. So I get some line in the form of: line = '(2,3,4)' line = '' line = '(2)' (in fact these are not

Re: Elisp Tutorial: HTML Syntax Coloring Code Block

2007-10-19 Thread Byung-Hee HWANG
On Wed, 2007-10-17 at 21:15 -0700, Xah Lee wrote: Elisp Tutorial: HTML Syntax Coloring Code Block Xah Lee, 2007-10 This page shows a example of writing a emacs lisp function that process a block of text to syntax color it by HTML tags. If you don't know elisp, first take a gander at Emacs

Re: how to iterate over sequence and non-sequence ?

2007-10-19 Thread Paul Hankin
On Oct 19, 12:24 am, stef mientki [EMAIL PROTECTED] wrote: I generate dynamically a sequence of values, but this sequence could also have length 1 or even length 0. So I get some line in the form of: line = '(2,3,4)' line = '' line = '(2)' (in fact these are not constant

Re: Noob questions about Python

2007-10-19 Thread cokofreedom
On Oct 19, 1:44 am, MRAB [EMAIL PROTECTED] wrote: On Oct 18, 7:05 am, Michele Simionato [EMAIL PROTECTED] wrote: On Oct 17, 5:58 pm, Ixiaus [EMAIL PROTECTED] wrote: def bin2dec(val): li = list(val) li.reverse() res = [int(li[x])*2**x for x in range(len(li))] print

Re: C++ version of the C Python API?

2007-10-19 Thread Stargaming
On Fri, 19 Oct 2007 17:37:29 -0500, Robert Dailey wrote: Hi, Is there a C++ version of the C Python API packaged with python 2.5? It would be nice to have a OOP approach to embedding python in C++. It would also be a bonus if this C++ Python API cleaned up a lot of the messy code involved

Re: __main__ : What is this?

2007-10-19 Thread Matt McCredie
En Fri, 19 Oct 2007 21:26:22 -0300, Matimus [EMAIL PROTECTED] escribió: The common pattern: if __name__ == __main__: # do stuff IMHO better written: if __main__ == __name__: # do stuff I'm intrigued why do you feel the second alternative is better. Which is your native

Re: __main__ : What is this?

2007-10-19 Thread Steven D'Aprano
On Sat, 20 Oct 2007 00:26:22 +, Matimus wrote: The common pattern: if __name__ == __main__: # do stuff IMHO better written: if __main__ == __name__: # do stuff Apart from looking weird, what's the difference? -- Steven. --

Re: Organizing Sequential Data (TimeStamps) Overthinking?

2007-10-19 Thread Paul Hankin
On Oct 19, 7:26 pm, xkenneth [EMAIL PROTECTED] wrote: Just a quick question. I want to be able to have a data structure that organizes data (timestamps I'm working with) sequentially, so that i can easily retrieve the first x amount of timeStamps without iterating over a list. My thought

documenting excepetions in Python

2007-10-19 Thread dale_bertrand
In python, how do I know what exceptions a method could raise? Do I need to look at the source? I don't see this info in the API docs for any of the APIs I'm using. Thanks in advance for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic invoke

2007-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2007 10:29:12 -0400, Sushant wrote: Python will not allow string to be used a function pointer. It is type unsafe. Best way is to convert string into function pointers manually. if dynamicMethod == 'bar': method = oFoo-bar else: method = oFoo-default method() I

Re: python logging module and custom handler specified in config file

2007-10-19 Thread Vinay Sajip
On 19 Oct, 12:04, Frank Aune [EMAIL PROTECTED] wrote: On Thursday 18 October 2007 19:26:59 Vinay Sajip wrote: What if you want to datestamp filenames for filehandlers, say with todays date for example? [handler_file] class=FileHandler level=NOTSET formatter=normal args=('filename.log',

Re: CGI Server that supports redirects

2007-10-19 Thread Michele Simionato
On Oct 19, 10:56 am, Thomas Guettler [EMAIL PROTECTED] guettler.de wrote: Hi, CGIHTTPServer does not support redirects[1] Is there an other python-only way to get a web server running wich can execute python code? Have you tried the CherryPy server, which is also included with Paste?

Re: dynamic invoke

2007-10-19 Thread lukasz . f24
On 19 Oct, 11:45, Jarek Zgoda [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] napisa³(a): Is there any way (other then eval) to invoke a method by passing method name in a string. It's very simple in php: $oFoo = new Foo(); $dynamiMethod = bar; $oFoo-$dynamiMethod(); Unfortunately I

Re: General module name clash problem?

2007-10-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Oct 2007 13:09:22 +0200, jipjip wrote: I mean, this is a general problem. Must i look for every module that gets importet for not clashing with my module files residing in the calling directory? Yes. Is the python package system insufficient, is there something wrong with my

Re: vote for Python - PLEASE

2007-10-19 Thread Steven Bethard
Monty Taylor wrote: MySQL has put up a poll on http://dev.mysql.com asking what your primary programming language is. Even if you don't use MySQL - please go stick in a vote for Python. I agree with others that voting here if you don't use MySQL is *not* a good idea. That said, I still

Re: how to iterate over sequence and non-sequence ?

2007-10-19 Thread Paul Hankin
On Oct 19, 5:38 pm, stef mientki [EMAIL PROTECTED] wrote: ... snip hand-coded debugger I couldn't come up with a better solution ;-) Does pdb not suffice? Even if it doesn't; you can look up variables without using exec, using locals()['x'] or globals()['x'] -- Paul Hankin --

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Lauri Alanko
Lauri Alanko added the comment: How do you measure importance? Z/OS is not important to many people in the world, but to those to whom it is important, it is _very_ important, in a very tangible way. It was certainly important enough for someone to port Python to it. :)

[issue602345] option for not writing .py[co] files

2007-10-19 Thread Georg Brandl
Georg Brandl added the comment: Since the PEP is now withdrawn, I updated Neal's patch to the trunk and added the env variable as well as the sys module value, including documentation. -- priority: low - normal Added file: http://bugs.python.org/file8567/no-pyc-flag.diff

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: I've committed the half of this patch that doesn't break any tests: the changes to codecs.c and structmember.c. Committed revision 58551. I'm seeking help getting the remaining unit tests to pass. (Thanks Thomas for the enumeration of the test failures!)

[issue1280] PEP 3137: Make PyString's indexing and iteration return integers

2007-10-19 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: - gvanrossum nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1280 __ ___ Python-bugs-list mailing list

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2007-10-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I found that BaseTsd.h is part of the Windows SDK, which is not included in the Express Edition. It can be installed separately. OTOH, the python core still compiles without the #include basetsd.h (using VC++ 2005 Express Edition). What about other

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: I will take this. -- assignee: brett.cannon - gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267 __ ___ Python-bugs-list

[issue1161] Garbled chars in offending line of SyntaxError traceback

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: There were some seriously broken things with exception reporting, most of which I seem to have fixed. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1161

[issue1151] TypeError: expected string, bytes found instead of KeyboardInterrupt

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: There were some seriously broken things with exception reporting, most of which I seem to have fixed. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1151

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: FYI, I checked the moderation queue for python-dev and didn't find your message. You might want to resend. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1298 __

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Attached is a patch to fix test_compile. Simple fix of turning an empty string into ``str8('')``. Added file: http://bugs.python.org/file8573/fix_test_compile.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1263

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-19 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1278 __ ___ Python-bugs-list mailing list

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: The file I just uploaded is unicode-string-eq-false-all-r4.patch with the codecs.c and structmember.c parts of the patch removed. -- nosy: +brett.cannon Added file: http://bugs.python.org/file8572/r4-revised.patch __

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: The bug was fixed in r58553 together with http://bugs.python.org/issue1267. Please close this bug. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1278 __

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58553 (with minor tweaks only). Thanks! -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267 __

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Christian Heimes
New submission from Christian Heimes: The patch fixes the output for profile and cProfile. Another patch from Alexandre and me added additional calls to the UTF-8 codec. -- components: Library (Lib) messages: 56569 nosy: gvanrossum, tiran severity: normal status: open title: Fixes for

[issue1280] PEP 3137: Make PyString's indexing and iteration return integers

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Checked in. I addressed some of your XXX'es, left others in (sre needs a serious checkup for compatibility with bytes). Committed revision 58552. -- resolution: - accepted status: open - closed __ Tracker [EMAIL

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: runpy is failing because pkgutil is failing because it is giving compile() part of a source file instead of the entire thing:: Traceback (most recent call last): File /Users/drifty/Dev/python/3.x/pristine/Lib/runpy.py, line 97, in _run_module_as_main

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: Brett Cannon added the comment: It looks like the file object returned by imp.find_module() has its read position WAY too far forward (at least on OS X). That's strange. It should never read more than 2 lines of a file. I don't

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: runpy is failing because pkgutil is failing because it is giving compile() part of a source file instead of the entire thing:: Traceback (most recent call last): File /Users/drifty/Dev/python/3.x/pristine/Lib/runpy.py, line 97, in _run_module_as_main

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: It looks like the file object returned by imp.find_module() has its read position WAY too far forward (at least on OS X). Re-opening. -- status: closed - open __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: It's unrelated to the problem but Parser/tokenizer.c:1619 has a minor bug. while(((tok-lineno = 2) (tok-done == E_OK))) { PyTokenizer_Get(tok, p_start, p_end); } (tok-lineno 2) is sufficient. See line 516 Christian

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: I don't have a Mac at my disposal any more. :( Can you attach the output of the failing tests to the bug report? Maybe I can be of assistance. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267

[issue1303] adapt str8 constructor to bytes constructor

2007-10-19 Thread Brett Cannon
Changes by Brett Cannon: -- nosy: +brett.cannon __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1303 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1303] adapt str8 constructor to bytes constructor

2007-10-19 Thread Brett Cannon
Changes by Brett Cannon: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1303 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Yeah, I just noticed this as well. is it definitely this change? On 10/19/07, Guido van Rossum [EMAIL PROTECTED] wrote: Guido van Rossum added the comment: FWIW, on Mac I get six failures (all these pass on Linux): test_cmd_line test_inspect

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Attached a fix for test_format. It was testing string interpolation on both str8 and str and using a str for the comparison. Since string interpolation is going away for str8 once it becomes bytes I just removed the testing of str8. The failures I know of left

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: OK, for some reason, when PyTokenizer_FindEncoding() is called and the resulting file is big enough, it starts off with a seek position (according to TextIOWrapper.tell()) of 4096. That happens to be exactly half the size of the buffer used by io. But I am not

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Nope, didn't do it. I also checked using gdb a few minutes ago and ftell() was reporting a position of 0 all they way back to PyObject_MethodCall(). __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Neal, didn't you say you had a fix for this? -- nosy: +nnorwitz __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1179 __ ___

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: 58557 as the fix. Yes, it was stupid on OS X's part and I was lucky to just think of the possible solution. Basically OS X does not like it when you do stuff with a file pointer but then poke around with the file descriptor. That means that when

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: OK, I think I might have a solution, and it is really stupid. I will run the unit test suite to see if it really fixes everything. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267 __

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: Brett Cannon added the comment: OK, for some reason, when PyTokenizer_FindEncoding() is called and the resulting file is big enough, it starts off with a seek position (according to TextIOWrapper.tell()) of 4096. That happens to be

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: I've made a short unit tests which tests a large file with and w/o -*- coding: -*-. It passes on Linux. Added file: http://bugs.python.org/file8575/py3k_test_issue1267.patch __ Tracker [EMAIL PROTECTED]

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I think I might have a solution, and it is really stupid. I will run the unit test suite to see if it really fixes everything. Here's keeping my fingers crossed. I do note that the new code still leaks the encoding string which is malloc'ed in

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: I checked in your `` 2`` change and plugged a memory leak since you were not freeing the struct tok_state. Checked in r58555. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267 __

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: On 10/19/07, Christian Heimes [EMAIL PROTECTED] wrote: Christian Heimes added the comment: Brett Cannon wrote: This suggests that perhaps we should standardize on file pointers or file descriptors in Python to prevent something like this from happening

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW, on Mac I get six failures (all these pass on Linux): test_cmd_line test_inspect test_modulefinder test_pyclbr test_quopri test_runpy __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: This suggests that perhaps we should standardize on file pointers or file descriptors in Python to prevent something like this from happening again. rewind() it used couple of times in the Python code. Have you checked if the other

[issue1303] adapt str8 constructor to bytes constructor

2007-10-19 Thread Georg Brandl
New submission from Georg Brandl: This makes the str8 constructor accept the same kinds of types as the bytes constructor. I had to fix instances of str8(abc) to str8(babc) to make tests pass again. The only remaining failure should be test_str -- the string test suite must be thoroughly

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Changes by Brett Cannon: Removed file: http://bugs.python.org/file8543/unnamed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1263 __ ___ Python-bugs-list mailing list

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Sure there is a patch ... well it's ... *uhm* ... it's hidden under your bed. O:-) Added file: http://bugs.python.org/file8569/py3k_profile_fix.patches __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1302

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-19 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I tested cmd.py on Linux and two things (including the one reported by OP) looked odd to me. 1) CTRL-D produces a message *** Unknown syntax: EOF. 2) CTRL-C produces a KeyboardInterrupt exception and the session terminates. I am attaching a patch that

[issue1304] py3k compilation on Windows

2007-10-19 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: This patch is needed to have py3k compile on win32, since the introduction of bytes_methods.c. Also, use the recently re-added md5module.c and sha1module.c, because a precompiled openssl library is difficult to obtain on Windows. Note: I tested only

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: There is no patch. =) -- assignee: - gvanrossum keywords: +py3k nosy: +brett.cannon __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1302 __

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1302 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1161] Garbled chars in offending line of SyntaxError traceback

2007-10-19 Thread Eduardo Padoan
Eduardo Padoan added the comment: Can't reproduce this error anymore with revision 58472. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1161 __ ___ Python-bugs-list mailing

[issue1151] TypeError: expected string, bytes found instead of KeyboardInterrupt

2007-10-19 Thread Eduardo Padoan
Eduardo Padoan added the comment: Can't reproduce this error anymore with revision 58472. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1151 __ ___ Python-bugs-list mailing

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-19 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: The fact that the problem occurs only from the command line and not when run from a script indicates that the real issue is in trying to print the object. Sure enough, if you modify the script to do repr(mydom.firstChild.childNodes), it gets the same

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: How do you measure importance? Z/OS is not important to many people in the world, but to those to whom it is important, it is _very_ important, in a very tangible way. It was certainly important enough for someone to port Python to it. :) But is it

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-19 Thread BULOT
BULOT added the comment: Hello, Here is my patch for cmd.py Regards stephbul Added file: http://bugs.python.org/file8566/cmd.py.keyboardinterrupt.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1294 __---

[issue602345] option for not writing .py[co] files

2007-10-19 Thread Tom Tanner
Tom Tanner added the comment: Is there likely to be any action on this. We can get issues with the creation of .pyc files due to our build setup. We can get situations where we run builds in parallel on 2 different architectures. Our build is set up so that anything generated by compilers end up

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: PyTokenizer_FindEncoding() is the culprit. If I comment it out in Python/import.c:call_find_module(), and thus just use the system encoding, runpy works again. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267

[issue1284] typo in lib doc 7.3.2.1 MaildirMessage

2007-10-19 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r58545, r58546 (2.5). -- nosy: +georg.brandl resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1284 __

[issue1299] distutils.sysconfig is not cross-platform compatible

2007-10-19 Thread Nick
Nick added the comment: I'll look into it this weekend. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1299 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Lauri Alanko
Lauri Alanko added the comment: The character set of EBCDIC is a superset of the character set of ASCII. In fact CP1047, the variant used on z/OS, has the same character set as Latin-1. Only the encoding is completely different. As a non-ASCII platform, z/OS is certainly challenging for people

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: Thanks. I just wish this whole ordeal had not been necessary (filed a bug report with Apple in hopes that this can be prevented for someone else). I can see why some people prefer to hack on PyPy, IronPython, or Jython instead of

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Thanks, Guido. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1267 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2007-10-19 Thread Nick
Nick added the comment: MS VC++ 2005 Express Edition __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1297 __ ___ Python-bugs-list mailing list Unsubscribe:

<    1   2