Ruby doctest

2008-06-22 Thread Paddy
I monitor changes to the Wikipedia doctest page, and so noticed a change in the Ruby implementation of doctest. Scooting around their implementation I found that they have an !!! special directive that says drop into the interpreter at this point when testing allowing debugging in context.

Re: flock seems very unsafe, python fcntl bug?

2008-06-22 Thread Jens Henrik Leonhard Jensen
Your problem is that open(...,'w') is not locked. Use something like: lockf = open('aaa', 'a') fnctl.flock(lockf,fnctl.LOCK_EX) file = open('aaa', 'w') file.write('asdf') file.close() lockf.close() [EMAIL PROTECTED] wrote: I ran following 2 programs (lock1, lock2) at almost same time, to write

Re: Fast and easy GUI prototyping with Python

2008-06-22 Thread Sebastian lunar Wiesner
Michael Torrie [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: 2) The Qt vs. .NET API. I have no experience with Qt's API and a rudimentary experience with the .NET API (seems powerfull but also big and complex). Qt's API is very very good. Easy to use and extremely powerful. Note that in

Storing value with limits in object

2008-06-22 Thread Josip
I'm trying to limit a value stored by object (either int or float): class Limited(object): def __init__(self, value, min, max): self.min, self.max = min, max self.n = value def set_n(self,value): if value self.min: # boundary check self.n = self.min

Re: Storing value with limits in object

2008-06-22 Thread David
On Sun, Jun 22, 2008 at 11:44 AM, Josip [EMAIL PROTECTED] wrote: I'm trying to limit a value stored by object (either int or float): class Limited(object): def __init__(self, value, min, max): self.min, self.max = min, max self.n = value def set_n(self,value): if

Re: Storing value with limits in object

2008-06-22 Thread Josip
Not with normal vars, because = is a rebinding operator in Python, rather than assignment. You can do (close to) the above with object properties. David. Yes, but it's done with built-in types like int and float. I suspect I could subclass from them and implement limits, but I would have

Learning Python in a group

2008-06-22 Thread Jonathan Roberts
Hi all, I'm looking to learn Python (as my first programming language) and I'm pretty sure I'd be more successful doing this with a group of other people. I've currently got one other person to learn with me, and we plan to work remotely over the net using tools such as IM/VoiP/Gobby/WIkis etc.

Re: Learning Python in a group

2008-06-22 Thread Henry Read
I'm a beginner, too.But python wasn't my first programming language. On Sun, Jun 22, 2008 at 6:43 PM, Jonathan Roberts [EMAIL PROTECTED] wrote: Hi all, I'm looking to learn Python (as my first programming language) and I'm pretty sure I'd be more successful doing this with a group of other

Re: Storing value with limits in object

2008-06-22 Thread David
On Sun, Jun 22, 2008 at 12:24 PM, Josip [EMAIL PROTECTED] wrote: Not with normal vars, because = is a rebinding operator in Python, rather than assignment. You can do (close to) the above with object properties. David. Yes, but it's done with built-in types like int and float. I suspect I

Re: Fast and easy GUI prototyping with Python

2008-06-22 Thread Pete Kirkham
2008/6/21 Val-Amart [EMAIL PROTECTED]: Use PyQt. You will gain great portability +all the functionality built in qt. You can try PyGTK also, though i wont recommend it. Why would you not recommend it? I've been using it for a mall project, and would like to know if there's some pit waiting

Re: Learning Python in a group

2008-06-22 Thread David
On Sun, Jun 22, 2008 at 12:43 PM, Jonathan Roberts [EMAIL PROTECTED] wrote: Hi all, I'm looking to learn Python (as my first programming language) and I'm pretty sure I'd be more successful doing this with a group of other people. I've currently got one other person to learn with me, and we

Re: Storing value with limits in object

2008-06-22 Thread Josip
In theory you could hack Python's internal locals or globals dictionary so that it did something unusual while looking up your object. But in practice this doesn't work, because the returned objects (when you call globals() or locals()) attributes are readonly. Probably because those internal

Re: Learning Python in a group

2008-06-22 Thread Jonathan Roberts
If you want people to meet with you (in person) as a mentor you should probably ask on your local Python or Linux users group mailing list. We're not really too worried about doing it in person - mostly because the people doing it so far are all at least 1000 miles away from each other :)

Re: Learning Python in a group

2008-06-22 Thread David
On Sun, Jun 22, 2008 at 1:52 PM, Jonathan Roberts [EMAIL PROTECTED] wrote: If you want people to meet with you (in person) as a mentor you should probably ask on your local Python or Linux users group mailing list. We're not really too worried about doing it in person - mostly because the

Re: Storing value with limits in object

2008-06-22 Thread George Sakkis
On Jun 22, 5:44 am, Josip [EMAIL PROTECTED] wrote: I'm trying to limit a value stored by object (either int or float): class Limited(object): def __init__(self, value, min, max): self.min, self.max = min, max self.n = value def set_n(self,value): if value

Re: Learning Python: Code critique please

2008-06-22 Thread Saul Spatz
macoovacany wrote: http://macoovacany.wordpress.com/ When I tried to run it, I got all kinds of syntax errors because of non-ASCII characters; namely, you have fancy left and right single and double quotes. Once I replaced these with the ASCII equivalents, it worked fine. I suggest you use a

Re: Storing value with limits in object

2008-06-22 Thread Larry Bates
Josip wrote: I'm trying to limit a value stored by object (either int or float): class Limited(object): def __init__(self, value, min, max): self.min, self.max = min, max self.n = value def set_n(self,value): if value self.min: # boundary check

Trying to Learn Packages

2008-06-22 Thread Saul Spatz
Hi, I'm making a project into my first package, mainly for organization, but also to learn how to do it. I have a number of data files, both experimental results and PNG files. My project is organized as a root directory, with two subdirectories, src and data, and directory trees below

pyHook and py2exe

2008-06-22 Thread Gandalf
hi every one. I have program which uses this pyHook lib, and when I try to compile it using py2exe the pyhook don't work. it gives me no error. the program works fine beside the function of this lib. why does it append ? is their any solution? I would be glad to know if anyone ever experienced

Re: How to convert a into a

2008-06-22 Thread dominique
On Jun 22, 6:45 am, Tim Roberts [EMAIL PROTECTED] wrote: dominique [EMAIL PROTECTED] wrote: On Jun 21, 1:37 pm, John Machin [EMAIL PROTECTED] wrote: Look at the operator module. In your above example: return { '': operator.gt, '=': operator.eq, '': operator.lt,

[PyQt4] QTableWidget non editable

2008-06-22 Thread Antonio Valentino
Ciao a tutti, ho un QTableWidget che ho reso non editabile settando editTriggers a NoEditTriggers. Il problema è che adesso non posso selezionare una cela e copiarne il contenuto nella clipboard. Come posso risolvere il problema? Grazie in anticipo antonio --

Re: Getting column names from a cursor using ODBC module?

2008-06-22 Thread Michael Mabin
The pyodb module doesn't implement this behavior. You would have to create a dictionary of column positions and column names in advance. On Sat, Jun 21, 2008 at 3:52 PM, Chris [EMAIL PROTECTED] wrote: On Jun 21, 3:58 pm, [EMAIL PROTECTED] wrote: Is there any way to retrieve column names from

Re: QTableWidget non editable

2008-06-22 Thread Antonio Valentino
On 22 Giu, 17:11, Antonio Valentino [EMAIL PROTECTED] wrote: Ciao a tutti, ho un QTableWidget che ho reso non editabile settando editTriggers a NoEditTriggers. Il problema è che adesso non posso selezionare una cela e copiarne il contenuto nella clipboard. Come posso risolvere il problema?

Re: Trying to Learn Packages

2008-06-22 Thread David
On Sun, Jun 22, 2008 at 4:07 PM, Saul Spatz [EMAIL PROTECTED] wrote: Hi, I'm making a project into my first package, mainly for organization, but also to learn how to do it. I have a number of data files, both experimental results and PNG files. My project is organized as a root directory,

Re: Trying to Learn Packages

2008-06-22 Thread Cédric Lucantis
Le Sunday 22 June 2008 16:07:37 Saul Spatz, vous avez écrit : Hi, I'm making a project into my first package, mainly for organization, but also to learn how to do it. I have a number of data files, both experimental results and PNG files. My project is organized as a root directory, with

Re: My n00bie brain hurts after Python setup.py install.

2008-06-22 Thread John Nagle
John Machin wrote: On Jun 22, 9:05 am, [EMAIL PROTECTED] wrote: I downloaded Mark Pilgrims's feedparser.py in a zipfile to my Windows machine, unzipped it and tried to install it to no avail. Eggs are part of a new experimental package distribution scheme. Don't worry about it. Yes.

Re: Learning Python in a group

2008-06-22 Thread Jonathan Roberts
I'm sure that many (myself included) would be happy to help out, but due to timezone differences, working hours, etc you may only get responses up to 24 hours (or more) later. Awesome, heh I'm sure we'll have questions for the list in good time :) What needs does your (non-face-to-face)

Re: Web Crawler - Python or Perl?

2008-06-22 Thread subeen
On Jun 13, 1:26 am, Chuck Rhode [EMAIL PROTECTED] wrote: On Mon, 09 Jun 2008 10:48:03 -0700, disappearedng wrote: I knowPythonbut notPerl, and I am interested in knowing which of these two are a better choice. I'm partial to *Python*, but, the last time I looked, *urllib2* didn't provide a

Re: Learning Python in a group

2008-06-22 Thread George Oliver
On Jun 22, 3:43 am, Jonathan Roberts [EMAIL PROTECTED] wrote: Hi all, I'm looking to learn Python (as my first programming language) and I'm pretty sure I'd be more successful doing this with a group of other people. hi Jon, I'm in the same situation as you and think a co-op method of

Re: Learning Python in a group

2008-06-22 Thread oesoriano
I might be interested in joining your group. I'm trying to learn python, too, but tend to get frustrated by the isolation. can you send me, or post, some details? - O -- http://mail.python.org/mailman/listinfo/python-list

Bind compiled code to name?

2008-06-22 Thread Karlo Lozovina
If string `source_code` contains Python source code, how can I execute that code, and bind it to some name? I tried compiling with: code_object = compile(source_code, 'errorfile', 'exec') but then what to do with `code_object`? P.S. If my intentions aren't that clear, this is what I'm

Re: Storing value with limits in object

2008-06-22 Thread Josip
Why not make it a function? function assignLimited(value, vmin, vmax): value = max(vmin, value) value = min(vmax, value) return value a = assignLimited(7, 0, 10) Seems like it solves your problem relatively cleanly. Note: I also removed min/max variables because they would

Re: Storing value with limits in object

2008-06-22 Thread Josip
Why not make it a function? function assignLimited(value, vmin, vmax): value = max(vmin, value) value = min(vmax, value) return value a = assignLimited(7, 0, 10) Seems like it solves your problem relatively cleanly. Note: I also removed min/max variables because they would

Re: install py2exe in vista

2008-06-22 Thread jim-on-linux
On Saturday 21 June 2008 13:28, Herman wrote: I want to install it in vistahttp://www.daniweb.com/forums/thread130469.htm l#, but i get this message in the process: could not create... py2exe-py2.5 I forwarded your question but you may want to ask again at the link below. [EMAIL PROTECTED]

-1/2

2008-06-22 Thread Serve Lau
What is the expected result of -1/2 in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Bind compiled code to name?

2008-06-22 Thread Martin v. Löwis
If string `source_code` contains Python source code, how can I execute that code, and bind it to some name? I tried compiling with: code_object = compile(source_code, 'errorfile', 'exec') but then what to do with `code_object`? P.S. If my intentions aren't that clear, this is

Re: pyHook and py2exe

2008-06-22 Thread jim-on-linux
On Sunday 22 June 2008 10:40, Gandalf wrote: hi every one. I have program which uses this pyHook lib, and when I try to compile it using py2exe the pyhook don't work. it gives me no error. the program works fine beside the function of this lib. why does it append ? is their any solution?

Re: Storing value with limits in object

2008-06-22 Thread Josip
I bet you didn't even try this, unless your definition of works includes a RuntimeError: maximum recursion depth exceeded. Here's a a working version: Actually, the version I'm using is somewhat bigger. I removed docstrings and recklessly stripped away some methods to make it shorter concise

Re: Bind compiled code to name?

2008-06-22 Thread Karlo Lozovina
Martin v. Löwis [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: d = {} exec source_code in d some_name = d['some_name'] This works quite well! I can't believe after googling for half on hour I didn't notice this exec ... in ... syntax. One more thing though, is there a way to access

Re: -1/2

2008-06-22 Thread Christian Heimes
Serve Lau wrote: What is the expected result of -1/2 in python? 0 Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: -1/2

2008-06-22 Thread Gary Herron
Serve Lau wrote: What is the expected result of -1/2 in python? -- http://mail.python.org/mailman/listinfo/python-list From the manual: The result is always rounded towards minus infinity: 1/2 is 0, (-1)/2 is -1, 1/(-2) is -1, and (-1)/(-2) is 0. Gary Herron --

Re: -1/2

2008-06-22 Thread Gary Herron
Christian Heimes wrote: Serve Lau wrote: What is the expected result of -1/2 in python? 0 No. That's not right. (It would be in C/C++ and many other languages.) See my other response for the correct answer. Gary Herron Christian --

pyTTS says, 'SAPI not supported'

2008-06-22 Thread weheh
I'm running Python 2.3 and calling pyTTS. I've had it working forever. Today, I ran out of disk space. After deleting some of my personal files, for no apparent reason, pyTTS no longer runs. For the statement tts = pyTTS.Create() I get the error message: ValueError: SAPI not

binary number format ? format character %b or similar.

2008-06-22 Thread Ken Starks
I'm was wanting to format a positive integer in binary, and not finding it--to my surprise--I rolled my own version. Is this already in python, or have I missed it somewhere? I have Googled around a bit, and found a few threads on the subject, but they all seem to fizzle out. (e.g. : INPUT 35,

Re: An idiom for code generation with exec

2008-06-22 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: On 20 juin, 21:44, eliben [EMAIL PROTECTED] wrote: ... The generic version has to make a lot of decisions at runtime, based on the format specification. Extract the offset from the spec, extract the length. ... example with lists of operations... Just my 2 cents.

Re: Way to unblock sys.stdin.readline() call

2008-06-22 Thread joamag
On Jun 21, 11:34 pm, Terry Reedy [EMAIL PROTECTED] wrote: joamag wrote: Is there any possible way to unblock the sys.stdin.readline() call from a different thread. If you want the thread to do something 'else' when no input is available, would this work?  Put readline in a thread that puts

Re: binary number format ? format character %b or similar.

2008-06-22 Thread weheh
I don't know if you found this example: http://www.daniweb.com/code/snippet285.html -- I'm was wanting to format a positive integer in binary, and not finding it--to my surprise--I rolled my own version. Is this already in python, or have I missed it somewhere? I have Googled around a

Re: Bind compiled code to name?

2008-06-22 Thread Martin v. Löwis
d = {} exec source_code in d some_name = d['some_name'] This works quite well! I can't believe after googling for half on hour I didn't notice this exec ... in ... syntax. One more thing though, is there a way to access some_name as a attribute, instead as a dictionary: some_name =

Re: Learning Python in a group

2008-06-22 Thread AngelinaCarmen
I would like to be a part of this if enough people are able to join up, I nabbed python less than two days ago, and have been trying to absorb as much as I can out of websites and practice projects. Learning this together would speed up the process slightly because we could share tips and such,

ImportError: cannot import name QtCore. using PyInstaller.1-3 and PyQt4 and Python 2.5

2008-06-22 Thread asoft
Please i need help with this. I just started using python and i hace run into several issues. The on that i can't tackle is the issue of no being able to compile the python code using PyQt4 application It gives the error ImportError: cannot import name QtCore. . I tries the trunk from the snv, but

Re: binary number format ? format character %b or similar.

2008-06-22 Thread Ken Starks
weheh wrote: I don't know if you found this example: http://www.daniweb.com/code/snippet285.html Thanks for that. The offerings are very similar to the algorithms I wrote myself. It wasn't the solution I was after,really; that's easy. It was whether anything had found its way into the

Regular expression problem

2008-06-22 Thread abranches
Hello everyone. I'm having a problem when extracting data from HTML with regular expressions. This is the source code: You are ready in the nextbr /span id=counter_jt_minutes style=display: inline;span id=counter_jt_minutes_value12/ spanM/span span id=counter_jt_seconds style=display:

Re: Getting column names from a cursor using ODBC module?

2008-06-22 Thread dananrg
Thanks Chris and John. Chris, this worked perfectly with the ODBC module that ships with Python Win32: column_names = [d[0] for d in cursor.description] John, I've never heard of pyodbc but I'll have to look into it. Thanks again. Dana -- http://mail.python.org/mailman/listinfo/python-list

rightclick-copy in IDLE?

2008-06-22 Thread cirfu
when i rightclick in python idle i get set breakpoint or something. n options i dont find a way to change to the normal copy/paste options. -- http://mail.python.org/mailman/listinfo/python-list

listcomprehension, add elements?

2008-06-22 Thread cirfu
[a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))] [51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51] i want to add all the elemtns a s well. can

Re: listcomprehension, add elements?

2008-06-22 Thread Jeff
On Jun 22, 6:32 pm, cirfu [EMAIL PROTECTED] wrote: [a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))] [51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,

Re: listcomprehension, add elements?

2008-06-22 Thread Paul Hankin
On Jun 23, 10:32 am, cirfu [EMAIL PROTECTED] wrote: [a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))] [51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,

Re: listcomprehension, add elements?

2008-06-22 Thread John Machin
On Jun 23, 9:23 am, Paul Hankin [EMAIL PROTECTED] wrote: On Jun 23, 10:32 am, cirfu [EMAIL PROTECTED] wrote: [a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))] [51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,

Re: Learning Python: Code critique please

2008-06-22 Thread William McBrine
On Sun, 22 Jun 2008 08:44:25 -0500, Saul Spatz wrote: macoovacany wrote: http://macoovacany.wordpress.com/ When I tried to run it, I got all kinds of syntax errors because of non-ASCII characters; namely, you have fancy left and right single and double quotes. That's probably WordPress'

Re: binary number format ? format character %b or similar.

2008-06-22 Thread Mensanator
On Jun 22, 4:07�pm, Ken Starks [EMAIL PROTECTED] wrote: weheh wrote: I don't know if you found this example: http://www.daniweb.com/code/snippet285.html Thanks for that. The offerings are very similar to the algorithms I wrote myself. It wasn't the solution I was after,really; that's

Re: -1/2

2008-06-22 Thread [EMAIL PROTECTED]
On Jun 22, 2:32 pm, Serve Lau [EMAIL PROTECTED] wrote: What is the expected result of -1/2 in python? I would say -1, but it depends on whether the - is a unary minus. -1/2 -1 3 -1/2 3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast and easy GUI prototyping with Python

2008-06-22 Thread Michael Torrie
Pete Kirkham wrote: 2008/6/21 Val-Amart [EMAIL PROTECTED]: Use PyQt. You will gain great portability +all the functionality built in qt. You can try PyGTK also, though i wont recommend it. Why would you not recommend it? I've been using it for a mall project, and would like to know if

Re: Tkinter canvas drag/drop obstacle

2008-06-22 Thread Peter Pearson
On Fri, 20 Jun 2008 13:41:35 -0300, Guilherme Polo [EMAIL PROTECTED] wrote: On Fri, Jun 20, 2008 at 1:11 PM, Peter Pearson [EMAIL PROTECTED] wrote: Tkinter makes it very easy to drag jpeg images around on a canvas, but I would like to have a target change color when the cursor dragging an

Re: Pattern Matching Over Python Lists

2008-06-22 Thread Chris
On Jun 19, 9:03 pm, John Machin [EMAIL PROTECTED] wrote: On Jun 20, 10:45 am, Chris [EMAIL PROTECTED] wrote: On Jun 17, 1:09 pm, [EMAIL PROTECTED] wrote: Kirk Strauser: Hint: recursion. Your general algorithm will be something like: Another solution is to use a better (different)

Re: Pattern Matching Over Python Lists

2008-06-22 Thread eliben
Fair enough. To help you understand the method I used, I'll give you this hint. It's true that regex on works on strings. However, is there any way to convert arbitrarily complex data structures to string representations? You don't need to be an experienced Python user to answer to this ;)

Re: Learning Python in a group

2008-06-22 Thread Satya Kiran
You can count me in too.I've been into python for sometime now. I agree that a collaborative learning makes it fun and helps you reach your goal faster. -- http://mail.python.org/mailman/listinfo/python-list

Re: An idiom for code generation with exec

2008-06-22 Thread eliben
Thanks for all the replies in this post. Just to conclude, I want to post a piece of code I wrote to encapsulate function creation in this way: def create_function(code): Create and return the function defined in code. m = re.match('\s*def\s+([a-zA-Z_]\w*)\s*\(', code) if m:

Re: Tkinter canvas drag/drop obstacle

2008-06-22 Thread Simon Forman
On Jun 22, 7:41 pm, Peter Pearson [EMAIL PROTECTED] wrote: On Fri, 20 Jun 2008 13:41:35 -0300, Guilherme Polo [EMAIL PROTECTED] wrote: On Fri, Jun 20, 2008 at 1:11 PM, Peter Pearson [EMAIL PROTECTED] wrote: Tkinter makes it very easy to drag jpeg images around on a canvas, but I would like

Re: Bind compiled code to name?

2008-06-22 Thread Giuseppe Ottaviano
class D:pass d = D() exec source_code in d.__dict__ print d.some_name Notice that this will also give you d.__builtins__, which you might want to del afterwards. If you want to mimic an import you can also do this: import types D = types.ModuleType('D') exec source_code in D.__dict__ print

Re: Learning Python in a group

2008-06-22 Thread Mensanator
On Jun 22, 5:43�am, Jonathan Roberts [EMAIL PROTECTED] wrote: Hi all, I'm looking to learn Python (as my first programming language) and I'm pretty sure I'd be more successful doing this with a group of other people. I've currently got one other person to learn with me, and we plan to work

POP3_SSL Error

2008-06-22 Thread Roopesh
Hi, While using poplib to fetch mails from my gmail account, I am getting the following error: Exception is POP3_SSL instance has no attribute 'sslobj' Can anyone tell me what this error means. Thanks and Regards Roopesh -- http://mail.python.org/mailman/listinfo/python-list

Re: rightclick-copy in IDLE?

2008-06-22 Thread Miki
when i rightclick in python idle i get set breakpoint or something. n options i dont find a way to change to the normal copy/paste options. Under Preferences ... menu you'll find Keys tab, there you can change the keys bindings to whatever you want. HTH, -- Miki [EMAIL PROTECTED]

Re: Trying to Learn Packages

2008-06-22 Thread Saul Spatz
Cédric Lucantis wrote: Le Sunday 22 June 2008 16:07:37 Saul Spatz, vous avez écrit : Hi, I'm making a project into my first package, mainly for organization, but also to learn how to do it. I have a number of data files, both experimental results and PNG files. My project is organized as a

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Adam Olsen
Adam Olsen [EMAIL PROTECTED] added the comment: * cause/context cycles should be avoided. Naive traceback printing could become confused, and I can't think of any accidental way to provoke it (besides the problem mentioned here.) * I suspect PyErr_Display handled string exceptions in 2.x, and

[issue3167] math test fails on Solaris 10

2008-06-22 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: I'll take a look. -- assignee: - marketdickinson nosy: +marketdickinson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167 ___

[issue3168] cmath test fails on Solaris 10

2008-06-22 Thread Mark Dickinson
Changes by Mark Dickinson [EMAIL PROTECTED]: -- assignee: - marketdickinson nosy: +marketdickinson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3168 ___

[issue3167] math test fails on Solaris 10

2008-06-22 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Could you tell me what import math math.log(float('-inf')) gives instead of the expected ValueError? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167

[issue2722] os.getcwd fails for long path names on linux

2008-06-22 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Went for the malloc only patch. Just fixed a small detail (weird corner case if malloc returned NULL first time, res will be unassigned). The test could be better (no necessity of using a recursive function, it could be done with a while),

[issue2732] curses.textpad loses characters at the end of lines

2008-06-22 Thread A.M. Kuchling
A.M. Kuchling [EMAIL PROTECTED] added the comment: This bug was fixed in 2.5 and 2.6, in rev. 60118 and 60119. Thanks for your bug report! -- assignee: - akuchling nosy: +akuchling resolution: - fixed status: open - closed ___ Python tracker

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Le dimanche 22 juin 2008 à 07:04 +, Adam Olsen a écrit : Adam Olsen [EMAIL PROTECTED] added the comment: * cause/context cycles should be avoided. Naive traceback printing could become confused, and I can't think of any accidental way

[issue3165] cPickle recursion problem

2008-06-22 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: What is this fixing? Could you please provide a test cases that fails without this patch? Thank you!! -- nosy: +facundobatista ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3165

[issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header

2008-06-22 Thread Chris Withers
Chris Withers [EMAIL PROTECTED] added the comment: Andi, I'm in total agreement with you :-) (so if this bug could get fixed, both issues could get closed) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1974

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Adam Olsen
Adam Olsen [EMAIL PROTECTED] added the comment: On Sun, Jun 22, 2008 at 8:07 AM, Antoine Pitrou [EMAIL PROTECTED] wrote: You mean they should be detected when the exception is set? I was afraid that it may make exception raising slower. Reporting is not performance sensitive in comparison to

[issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error

2008-06-22 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Fixed in r64461. Thanks! -- resolution: - fixed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3085 ___

[issue3157] sqlite3 minor documentation issues

2008-06-22 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I fixed the docstring in r64463 (2.5 branch, already fixed in trunk) and expanded the connect() docstring in r64464. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error

2008-06-22 Thread Manuel Kaufmann
Manuel Kaufmann [EMAIL PROTECTED] added the comment: This bug was reported on Python 2.5 version and was applied on 2.6 branch. That's correct? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3085 ___

[issue3146] Sphinx/LaTeX fails on Python 3.0b1 documentation

2008-06-22 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, should be fixed with Sphinx r64465. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3146 ___

[issue3085] chapter 17.1.3.5 'Replacing os.popen*' in the Python library reference contains an error

2008-06-22 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I don't maintain the 2.5 docs anymore, at least for such minor bugs. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3085 ___

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Adam Olsen
Adam Olsen [EMAIL PROTECTED] added the comment: On Sun, Jun 22, 2008 at 1:04 PM, Antoine Pitrou [EMAIL PROTECTED] wrote: Antoine Pitrou [EMAIL PROTECTED] added the comment: Le dimanche 22 juin 2008 à 17:17 +, Adam Olsen a écrit : I meant only that trivial cycles should be detected.

[issue1523853] 2.4.2 file.read caches EOF state

2008-06-22 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: In Linux, it seems to be the behaviour of the underlying C function 'fread'. Do you think it's ok to add the following line in the read() documentation? As this function depends of the underlying C function :cfunc:`fread`, inheritates its

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Le dimanche 22 juin 2008 à 19:23 +, Adam Olsen a écrit : For this behaviour, this is the most natural way to write it. Conceptually, there shouldn't be a cycle I agree your example is not far-fetched. How about avoiding cycles for

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Adam Olsen
Adam Olsen [EMAIL PROTECTED] added the comment: On Sun, Jun 22, 2008 at 1:48 PM, Antoine Pitrou [EMAIL PROTECTED] wrote: Antoine Pitrou [EMAIL PROTECTED] added the comment: Le dimanche 22 juin 2008 à 19:23 +, Adam Olsen a écrit : For this behaviour, this is the most natural way to write

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Le dimanche 22 juin 2008 à 19:57 +, Adam Olsen a écrit : That's still O(n). I'm not so easily convinced it's cheap enough. O(n) when n will almost never be greater than 5 (and very often equal to 1 or 2), and when the unit is the cost of

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Adam Olsen
Adam Olsen [EMAIL PROTECTED] added the comment: On Sun, Jun 22, 2008 at 2:20 PM, Antoine Pitrou [EMAIL PROTECTED] wrote: Antoine Pitrou [EMAIL PROTECTED] added the comment: Le dimanche 22 juin 2008 à 19:57 +, Adam Olsen a écrit : That's still O(n). I'm not so easily convinced it's

[issue3112] implement PEP 3134 exception reporting

2008-06-22 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Le dimanche 22 juin 2008 à 20:40 +, Adam Olsen a écrit : How do you duplicate an instance of an user-defined exception? Using an equivalent of copy.deepcopy()? It will probably end up much more expensive than the above-mentioned O(n)

[issue1567948] poplib.py list interface

2008-06-22 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Hasan, are you still interested in this or wants to drop this request? Passing almost two years without comments it's no good if you'll be the package maintainer. Thanks! -- nosy: +facundobatista

[issue678464] Docs don't define sequence-ness very well

2008-06-22 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Skip, don't you think it's better to raise this kind of generic question in the python-dev list? This should probably lay down here for ever before a discussion raises to decide this. -- nosy: +facundobatista

[issue701743] Reloading pseudo modules

2008-06-22 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Walter, the import mechanisms changed by a big rework from Brett Cannon in the last months. Do you think still have a use case that should be fulfilled? Do you want to update your patch? Thank you! -- nosy: +facundobatista

[issue3051] heapq change breaking compatibility

2008-06-22 Thread Raymond Hettinger
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3051 ___ ___ Python-bugs-list

[issue3069] Let set.union and set.intersection accept multiple arguments

2008-06-22 Thread Raymond Hettinger
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3069 ___ ___ Python-bugs-list

  1   2   >