Re: PEP 3147 - new .pyc format

2010-01-30 Thread Steven D'Aprano
On Sun, 31 Jan 2010 04:44:18 +0100, Alf P. Steinbach wrote: >> The relationship between byte code magic number and release version >> number is not one-to-one. We could have, for the sake of the argument, >> releases 3.2.3 through 3.5.0 (say) all having the same byte codes. What >> version number

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Alf P. Steinbach
* Steven D'Aprano: On Sat, 30 Jan 2010 18:40:42 -0800, Paul Rubin wrote: Ben Finney writes: 0c4f0a0d.pyc # Python 3.1 Mapping magic numbers to versions is infeasible and will be incomplete: Any mapping that exists in (say) Python 3.1 can't know in advance what the magic number will be fo

Re: Function name unchanged in error message

2010-01-30 Thread Steven D'Aprano
On Sat, 30 Jan 2010 14:26:43 -0800, andrew cooke wrote: > On Jan 29, 11:50 am, exar...@twistedmatrix.com wrote: >> new.function and new.code will let you construct new objects with >> different values (and copying over whichever existing attributes you >> want to preserve). > > unfortunately new

Re: Still too slow

2010-01-30 Thread Dave Angel
John Posner wrote: On 1/30/2010 6:08 PM, elsa wrote: Hello again, Thanks for the tips r.e random.ranint(). This improved matters somewhat, however my program is still too slow. If anyone has any further tips on how to speed it up, they would be much appreciated! So, I'm calling evolve(L,limit)

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Steven D'Aprano
On Sat, 30 Jan 2010 18:40:42 -0800, Paul Rubin wrote: > Ben Finney writes: >>> 0c4f0a0d.pyc # Python 3.1 >> Mapping magic numbers to versions is infeasible and will be incomplete: >> Any mapping that exists in (say) Python 3.1 can't know in advance what >> the magic number will be for Python

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Paul Rubin
Ben Finney writes: >> 0c4f0a0d.pyc # Python 3.1 > Mapping magic numbers to versions is infeasible and will be incomplete: > Any mapping that exists in (say) Python 3.1 can't know in advance what > the magic number will be for Python 4.5. But why do the filenames have magic numbers instead of

Re: Still too slow

2010-01-30 Thread MRAB
elsa wrote: Hi John and others, sorry about my etiquette errors. As you can tell I'm a newbie, and appreciate all the help I can get. I'm trying to master this thing with only the net and a couple of books as tutors. Here is what I'm running at the interactive prompt: [snip] def event():

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Ben Finney
Steven D'Aprano writes: > Unfortunately the magic number doesn't seem to be documented anywhere > I can find other than in the source code (import.c). The PEP gives > some examples: > > f2b30a0d.pyc # Python 2.5 > f2d10a0d.pyc # Python 2.6 > f2d10a0d.pyo # Python 2.6 -O > f2d20a0d

Re: Microsoft Office Word and Python (Win XP)

2010-01-30 Thread Dave Angel
peskar.m...@hotmail.com wrote: 21 days has passed and still noone is willing to help :-( ch /willing/able/ I wouldn't say no-one, even then, since there were at least 10 messages in the thread on the 19th and 20th. Presumably they weren't all from you. If you were doing this to text fil

Re: Still too slow

2010-01-30 Thread elsa
Hi John and others, sorry about my etiquette errors. As you can tell I'm a newbie, and appreciate all the help I can get. I'm trying to master this thing with only the net and a couple of books as tutors. Here is what I'm running at the interactive prompt: >>> import myBDM >>> L=[[100,'NA']] >>>

Re: Still too slow

2010-01-30 Thread Alf P. Steinbach
* Alf P. Steinbach: * elsa: Thanks for the tips r.e random.ranint(). This improved matters somewhat, however my program is still too slow. If anyone has any further tips on how to speed it up, they would be much appreciated! So, I'm calling evolve(L,limit) from the interactive prompt. L is ini

Re: Still too slow

2010-01-30 Thread Alf P. Steinbach
* elsa: Thanks for the tips r.e random.ranint(). This improved matters somewhat, however my program is still too slow. If anyone has any further tips on how to speed it up, they would be much appreciated! So, I'm calling evolve(L,limit) from the interactive prompt. L is initally [[100],['NA']].

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Steven D'Aprano
On Sat, 30 Jan 2010 14:14:54 -0800, John Roth wrote: > PEP 3147 has just been posted, proposing that, beginning in release 3.2 > (and possibly 2.7) compiled .pyc and .pyo files be placed in a directory > with a .pyr extension. The reason is so that compiled versions of a > program can coexist, whi

Re: PEP 3147 - new .pyc format

2010-01-30 Thread MRAB
John Bokma wrote: MRAB writes: Alf P. Steinbach wrote: * John Bokma: MRAB writes: The PEP has a .pyr directory for each .py file: foo.py foo.pyr/ f2b30a0d.pyc # Python 2.5 f2d10a0d.pyc # Python 2.6 f2d10a0d.pyo # Python 2.6 -O f2d20a0d.pyc # Python

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Neil Hodgson
John Roth: > 4. I'm in favor of putting the source in the .pyr directory as well, > but that's got a couple more issues. One is tool support, which is > likely to be worse for source, and the other is some kind of algorithm > for identifying which source goes with which object. Many tools work

Re: PEP 3147 - new .pyc format

2010-01-30 Thread John Bokma
MRAB writes: > Alf P. Steinbach wrote: >> * John Bokma: >>> MRAB writes: >>> The PEP has a .pyr directory for each .py file: foo.py foo.pyr/ f2b30a0d.pyc # Python 2.5 f2d10a0d.pyc # Python 2.6 f2d10a0d.pyo # Python 2.6 -O

Re: Still too slow

2010-01-30 Thread John Posner
On 1/30/2010 6:08 PM, elsa wrote: Hello again, Thanks for the tips r.e random.ranint(). This improved matters somewhat, however my program is still too slow. If anyone has any further tips on how to speed it up, they would be much appreciated! So, I'm calling evolve(L,limit) from the interactiv

Re: PEP 3147 - new .pyc format

2010-01-30 Thread MRAB
Alf P. Steinbach wrote: * John Bokma: MRAB writes: The PEP has a .pyr directory for each .py file: foo.py foo.pyr/ f2b30a0d.pyc # Python 2.5 f2d10a0d.pyc # Python 2.6 f2d10a0d.pyo # Python 2.6 -O f2d20a0d.pyc # Python 2.6 -U 0c4f0a0d.pyc # Pyth

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Carl Banks
On Jan 30, 2:14 pm, John Roth wrote: > PEP 3147 has just been posted, proposing that, beginning in release > 3.2 (and possibly 2.7) compiled .pyc and .pyo files be placed in a > directory with a .pyr extension. The reason is so that compiled > versions of a program can coexist, which isn't possibl

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Alf P. Steinbach
* John Bokma: MRAB writes: The PEP has a .pyr directory for each .py file: foo.py foo.pyr/ f2b30a0d.pyc # Python 2.5 f2d10a0d.pyc # Python 2.6 f2d10a0d.pyo # Python 2.6 -O f2d20a0d.pyc # Python 2.6 -U 0c4f0a0d.pyc # Python 3.1 wow: so much for

Re: PEP 3147 - new .pyc format

2010-01-30 Thread John Bokma
MRAB writes: > The PEP has a .pyr directory for each .py file: > > foo.py > foo.pyr/ > f2b30a0d.pyc # Python 2.5 > f2d10a0d.pyc # Python 2.6 > f2d10a0d.pyo # Python 2.6 -O > f2d20a0d.pyc # Python 2.6 -U > 0c4f0a0d.pyc # Python 3.1 wow: so much for

Re: Still too slow

2010-01-30 Thread Philip Semanchuk
On Jan 30, 2010, at 6:08 PM, elsa wrote: Hello again, Thanks for the tips r.e random.ranint(). This improved matters somewhat, however my program is still too slow. If anyone has any further tips on how to speed it up, they would be much appreciated! So, I'm calling evolve(L,limit) from the i

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
On Jan 29, 1:09 pm, Michele Simionato wrote: > On Jan 29, 2:30 pm, andrew cooke wrote: > > > Is there any way to change the name of the function in an error > > message?  In the example below I'd like the error to refer to bar(), > > for example (the motivation is related function decorators - I'

Re: Slow down while creating a big list and iterating over it

2010-01-30 Thread MRAB
Alf P. Steinbach wrote: * marc magrans de abril: Dear colleagues, I was doing a small program to classify log files for a cluster of PCs, I just wanted to simplify a quite repetitive task in order to find errors and so. My first naive implementation was something like: patterns = [] wh

Still too slow

2010-01-30 Thread elsa
Hello again, Thanks for the tips r.e random.ranint(). This improved matters somewhat, however my program is still too slow. If anyone has any further tips on how to speed it up, they would be much appreciated! So, I'm calling evolve(L,limit) from the interactive prompt. L is initally [[100],['NA'

Re: PEP 3147 - new .pyc format

2010-01-30 Thread MRAB
John Roth wrote: PEP 3147 has just been posted, proposing that, beginning in release 3.2 (and possibly 2.7) compiled .pyc and .pyo files be placed in a directory with a .pyr extension. The reason is so that compiled versions of a program can coexist, which isn't possible now. Frankly, I think th

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Mensanator
On Jan 30, 4:14 pm, John Roth wrote: > PEP 3147 has just been posted, proposing that, beginning in release > 3.2 (and possibly 2.7) compiled .pyc and .pyo files be placed in a > directory with a .pyr extension. The reason is so that compiled > versions of a program can coexist, which isn't possibl

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
On Jan 30, 7:17 pm, andrew cooke wrote: > On Jan 29, 5:37 pm, "Gabriel Genellina" > wrote: > > > The decorator module is a very fine addition to anyone's tool set -- but   > > in this case it is enough to use the wraps() function from the functools   > > standard module. > > ah, thanks!  i though

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
On Jan 29, 11:50 am, exar...@twistedmatrix.com wrote: > new.function and new.code will let you construct new objects with > different values (and copying over whichever existing attributes you > want to preserve). unfortunately new is deprecated and dropped from 3. i can't see how the same functi

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
On Jan 29, 5:37 pm, "Gabriel Genellina" wrote: > The decorator module is a very fine addition to anyone's tool set -- but   > in this case it is enough to use the wraps() function from the functools   > standard module. ah, thanks! i thought something like this existed in the standard lib, but c

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
On Jan 29, 11:22 am, Peter Otten <__pete...@web.de> wrote: > The name is looked up in the code object. As that is immutable you have to > make a new one: [details snipped] thanks very much! sorry i didn't reply earlier - been travelling. (also, thanks to any other replies - i'm just reading thro

PEP 3147 - new .pyc format

2010-01-30 Thread John Roth
PEP 3147 has just been posted, proposing that, beginning in release 3.2 (and possibly 2.7) compiled .pyc and .pyo files be placed in a directory with a .pyr extension. The reason is so that compiled versions of a program can coexist, which isn't possible now. Frankly, I think this is a really good

Re: Slow down while creating a big list and iterating over it

2010-01-30 Thread Alf P. Steinbach
* marc magrans de abril: Dear colleagues, I was doing a small program to classify log files for a cluster of PCs, I just wanted to simplify a quite repetitive task in order to find errors and so. My first naive implementation was something like: patterns = [] while(logs): patter

Slow down while creating a big list and iterating over it

2010-01-30 Thread marc magrans de abril
Dear colleagues, I was doing a small program to classify log files for a cluster of PCs, I just wanted to simplify a quite repetitive task in order to find errors and so. My first naive implementation was something like: patterns = [] while(logs): pattern = logs[0] new_log

Re: unencountered error in FFT python

2010-01-30 Thread uche
On Jan 30, 2:30 pm, uche wrote: > On Jan 30, 2:21 pm, Stefan Behnel wrote: > > > > > > > Stefan Behnel, 30.01.2010 19:52: > > > > uche, 30.01.2010 19:33: > > >> I have the following FFT python code > > > > You didn't seriously implement an FFT in plain Python code, did you? > > > Sorry, no, you d

Re: Python and Ruby

2010-01-30 Thread Stephen Hansen
On Sat, Jan 30, 2010 at 8:58 AM, tanix wrote: > The very idea of using a number of blanks to identify your block level > is as insane as it gets. First of all, combinations of blanks and tabs, > depending on how your ide is setup to expand tabs, may get you bugs, > you'd never imagine in your wil

Re: unencountered error in FFT python

2010-01-30 Thread uche
On Jan 30, 2:21 pm, Stefan Behnel wrote: > Stefan Behnel, 30.01.2010 19:52: > > > uche, 30.01.2010 19:33: > >> I have the following FFT python code > > > You didn't seriously implement an FFT in plain Python code, did you? > > Sorry, no, you didn't. Should have read your post a little closer. > >

Re: unencountered error in FFT python

2010-01-30 Thread Stefan Behnel
uche, 30.01.2010 20:18: > I got another problem after changing / to // . Yes, I am using 3.1. > > W.append(exp(sign * 2j * pi * i // N)) > TypeError: can't take floor of complex number. Don't change it everywhere, just where it deals with integers. In the above, "/" is perfectly right. Stefa

Re: Utility to screenscrape sites using javascript ?

2010-01-30 Thread KB
> On Sat, 30 Jan 2010 06:21:01 -0800, KB wrote: > > I have a service I subscribe to that uses javascript to stream news. > There's a Python interface to SpiderMonkey (Mozilla's JavaScript > interpreter): > > http://pypi.python.org/pypi/python-spidermonkey Thanks! I don't see a documentation page

Re: unencountered error in FFT python

2010-01-30 Thread Stefan Behnel
Stefan Behnel, 30.01.2010 19:52: > uche, 30.01.2010 19:33: >> I have the following FFT python code > > You didn't seriously implement an FFT in plain Python code, did you? Sorry, no, you didn't. Should have read your post a little closer. > FFTs > are amongst the first thing that come to my min

Re: unencountered error in FFT python

2010-01-30 Thread uche
On Jan 30, 2:08 pm, MRAB wrote: > uche wrote: > > Hi, > > I have the following FFT python code and it doesn't seem to compile > > correctly. To run it, please create a file called output.csv with > > 1,2,3,4,5,6,7,8. simply run the main function. I get an error such as > > the following: > > >    

Re: Python and Ruby

2010-01-30 Thread Steven D'Aprano
On Sat, 30 Jan 2010 16:58:34 +, tanix wrote: > In article , Nobody > wrote: >>On Wed, 27 Jan 2010 15:29:05 -0800, Jonathan Gardner wrote: >> >>> There's a lot of "magic" in Ruby as well. For instance, function calls >>> are made without parentheses. >> >>That's also true for most functional l

Re: unencountered error in FFT python

2010-01-30 Thread MRAB
uche wrote: Hi, I have the following FFT python code and it doesn't seem to compile correctly. To run it, please create a file called output.csv with 1,2,3,4,5,6,7,8. simply run the main function. I get an error such as the following: x[a], x[b] = x[(a)] + W[(n % N)] * x[(b)], x[(a)] - W[(n

www.assembly.learn.net.in

2010-01-30 Thread groups_ads12
http://www.assembly.learn.net.in/ assembly assembly of god assemble

Re: Default path for files

2010-01-30 Thread Aahz
In article , Rotwang wrote: > >Hi all, can anybody tell me whether there's a way to change the default >location for files to be opened by open()? I'd like to be able to create >files somewhere other than my Python folder without having to write the >full path in the filename every time. Sorry

Re: unencountered error in FFT python

2010-01-30 Thread Stefan Behnel
uche, 30.01.2010 19:33: > I have the following FFT python code You didn't seriously implement an FFT in plain Python code, did you? FFTs are amongst the first thing that come to my mind when I try to imagine what I'd use NumPy for. (and I *never* used it!) Stefan -- http://mail.python.org/mailma

Re: myths about python 3

2010-01-30 Thread Martin v. Loewis
Christian Heimes wrote: > Blog wrote: >> WTF? Where'd you hear about version 2.8? FRI, 2.7 is and will be THE >> LAST version of the 2.x series - "the" End-Of-Life for Python 2 > > Where do you get your information from? It was discussed repeatedly on python-dev, last time when the release anno

unencountered error in FFT python

2010-01-30 Thread uche
Hi, I have the following FFT python code and it doesn't seem to compile correctly. To run it, please create a file called output.csv with 1,2,3,4,5,6,7,8. simply run the main function. I get an error such as the following: x[a], x[b] = x[(a)] + W[(n % N)] * x[(b)], x[(a)] - W[(n % N)] * x [(b)

Re: myths about python 3

2010-01-30 Thread Blog
On 1/30/2010 10:06 AM, Ben Finney wrote: Blog writes: (Debian does ship with 2.5, but the next major release "sid' is due out in Q2) Sid is the perpetual development playground (“unstable”), never released as a suite, but a proving ground for packages to determine their fitness for going to

Re: Threading issue with SQLite

2010-01-30 Thread John Nagle
Jonathan Gardner wrote: On Jan 29, 8:37 am, Alan Harris-Reid wrote: Questions... 1. Is there a large overhead in opening a new SQLite connection for each thread (ie. within each method)? Suggestion: Use something like SQLAlchemy to manage you DB interactions. One day, you'll move away from

Re: myths about python 3

2010-01-30 Thread Blog
On 1/30/2010 11:47 PM, Christian Heimes wrote: Blog wrote: WTF? Where'd you hear about version 2.8? FRI, 2.7 is and will be THE LAST version of the 2.x series - "the" End-Of-Life for Python 2 Where do you get your information from? Your answer is the first that clearly marks the end of lifetim

Re: myths about python 3

2010-01-30 Thread Christian Heimes
Blog wrote: > WTF? Where'd you hear about version 2.8? FRI, 2.7 is and will be THE > LAST version of the 2.x series - "the" End-Of-Life for Python 2 Where do you get your information from? Your answer is the first that clearly marks the end of lifetime for the 2.x series. I didn't know that and I

Re: Python and Ruby

2010-01-30 Thread Ed Keith
--- On Sat, 1/30/10, Nobody wrote: > From: Nobody > > Python is much, much cleaner. I don't know how anyone > can honestly say > > Ruby is cleaner than Python. > > I'm not familiar with Ruby, but most languages are cleaner > than Python > once you get beyond the "10-minute introduction" stage.

Re: Utility to screenscrape sites using javascript ?

2010-01-30 Thread Nobody
On Sat, 30 Jan 2010 06:21:01 -0800, KB wrote: > I have a service I subscribe to that uses javascript to stream news. > Ideally I would like to use python to parse the information for me. Note > there is an option to take a static snapshot of the current stream but > that is still done via Javascri

Re: Python and Ruby

2010-01-30 Thread tanix
In article , Nobody wrote: >On Wed, 27 Jan 2010 15:29:05 -0800, Jonathan Gardner wrote: > >> There's a lot of "magic" in Ruby as well. For instance, function calls are >> made without parentheses. > >That's also true for most functional languages, e.g. Haskell and ML, as >well as e.g. Tcl and mos

Re: Keyboard input

2010-01-30 Thread Nobody
On Fri, 29 Jan 2010 16:53:43 +, Mr.SpOOn wrote: > I'm using the raw_input method and it works fine, but I noted that I can't > use backspace and when I accidentally press shift space (because I need to > input uppercase letters separated by a space) it writes some strange > characters. > > So

Re: Python and Ruby

2010-01-30 Thread Nobody
On Wed, 27 Jan 2010 15:29:05 -0800, Jonathan Gardner wrote: > There's a lot of "magic" in Ruby as well. For instance, function calls are > made without parentheses. That's also true for most functional languages, e.g. Haskell and ML, as well as e.g. Tcl and most shells. Why require "f(x)" or "(f

Re: myths about python 3

2010-01-30 Thread Kevin Walzer
On 1/30/10 11:29 AM, Nobody wrote: Arguably, Python 3 has not yet been accepted by the market. Part of it is down to a catch-22: applications won't use Python 3 if the libraries on which they depend don't support it, and support for Python 3 by libraries will be influenced by the perceived dema

Re: myths about python 3

2010-01-30 Thread Nobody
On Wed, 27 Jan 2010 12:56:10 -0800, John Nagle wrote: > Arguably, Python 3 has been rejected by the market. Arguably, Python 3 has not yet been accepted by the market. Part of it is down to a catch-22: applications won't use Python 3 if the libraries on which they depend don't support it, and su

Re: Default path for files

2010-01-30 Thread Nobody
On Sun, 24 Jan 2010 15:08:15 +, Rotwang wrote: > Hi all, can anybody tell me whether there's a way to change the default > location for files to be opened by open()? I'd like to be able to create > files somewhere other than my Python folder without having to write the > full path in the filen

Re: list.extend([]) Question

2010-01-30 Thread Steve Holden
Dan Brown wrote: > Why does extending a list with the empty list result in None? It > seems very counterintuitive to me, at least --- I expected ['a'].extend > ([]) to result in ['a'], not None. How very inconvenient of Python! What it actually does is create an anonymous list containing only the

Re: list.extend([]) Question

2010-01-30 Thread Dan Brown
On Jan 30, 8:38 am, "Alf P. Steinbach" wrote: > It does. > > 'extend' is an operation that /modifies/ the array. > > It just returns None as its expression result, in the same way as e.g. the > Python 3.x 'print' (another pure "doer" operation). > >    >>> L = ['a'] >    >>> L >    ['a'] >    >>>

Re: list.extend([]) Question

2010-01-30 Thread Andre Engels
On Sat, Jan 30, 2010 at 4:32 PM, Dan Brown wrote: > Why does extending a list with the empty list result in None?  It > seems very counterintuitive to me, at least --- I expected ['a'].extend > ([]) to result in ['a'], not None. Extend is a method of the list. The list itself is changed, it does

Re: list.extend([]) Question

2010-01-30 Thread Alf P. Steinbach
* Dan Brown: Why does extending a list with the empty list result in None? It seems very counterintuitive to me, at least --- I expected ['a'].extend ([]) to result in ['a'], not None. It does. 'extend' is an operation that /modifies/ the array. It just returns None as its expression result,

list.extend([]) Question

2010-01-30 Thread Dan Brown
Why does extending a list with the empty list result in None? It seems very counterintuitive to me, at least --- I expected ['a'].extend ([]) to result in ['a'], not None. -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: module cleanup function

2010-01-30 Thread Mr.M
Stefan Behnel ha scritto: Note that there is the type() builtin function which returns the type given an instance. So you can't hide the type. Argh! Yes, you are right. So I'd better have a look to Cython, right? L- -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Office Word and Python (Win XP)

2010-01-30 Thread Steve Holden
peskar.m...@hotmail.com wrote: > 21 days has passed and still noone is willing to help :-( Y'know, the Internet isn't a magic lantern. Perhaps you need to ask your question differently, or provide more information. Maybe there's something *you* could do to help you get closer to the answer to *you

Re: Microsoft Office Word and Python (Win XP)

2010-01-30 Thread Alf P. Steinbach
* peskar.m...@hotmail.com: 21 days has passed and still noone is willing to help :-( Did you see the reply from Marco Nawin? If you don't see that reply, dated (a bit less than) 2 hours after your original posting on the 9th, I can repost it here. If you have any follow-up questions just po

Re: C API: module cleanup function

2010-01-30 Thread Stefan Behnel
Mr.M, 30.01.2010 14:24: > Could I allocate my resources in a "static" object linked to my module? Sure, but you will have to let CPython know about it so that it can see that the reference is only held by the module that it is cleaning up. Otherwise it can't collect the reference. This works easil

Re: Microsoft Office Word and Python (Win XP)

2010-01-30 Thread peskar.m...@hotmail.com
21 days has passed and still noone is willing to help :-( -- http://mail.python.org/mailman/listinfo/python-list

Utility to screenscrape sites using javascript ?

2010-01-30 Thread KB
Hi there, I have a service I subscribe to that uses javascript to stream news. Ideally I would like to use python to parse the information for me. Note there is an option to take a static snapshot of the current stream but that is still done via Javascript. (I can reference the snapshot with a uni

Re: C API: module cleanup function

2010-01-30 Thread Mr.M
Stefan Behnel ha scritto: Gabriel already pointed you to the module cleanup support in Py3, which can be used to provide reload capabilities to your module. In Py2, there are at least some ways to free resources when terminating the interpreter. See the "atexit" module and the Py_AtExit() functi

Re: Some C-API functions clear the error indicator?

2010-01-30 Thread Antoine Pitrou
Le Fri, 29 Jan 2010 22:25:14 +0100, Austin Bingham a écrit : > Maybe I'm not following what you're saying. In my case, I already know > that an exception has been thrown. In the course of processing that > exception, I call another function which, for whatever reason and even > when it succeeds, cl

Re: Funny behaviour with __future__ and doctest between 2.6 and 3.1

2010-01-30 Thread Mattsteel
On 29 Gen, 17:30, Peter Otten <__pete...@web.de> wrote: > I think you can work around the problem. The following should pass in Python > 2.6 and 3.1: > > '''>>> concat('hello','world') == 'hello world' > True > ''' I see. Thank for the concern. M. -- http://mail.python.org/mailman/listinfo/python

Re: Sleep timer but still responsive?

2010-01-30 Thread Dave Angel
JohnnyFive wrote: On Jan 29, 9:33 am, Andreas Tawn wrote: On Jan 28, 4:55 pm, "Gabriel Genellina" wrote: Please provide more details. What do you want your program to do while sleeping? What kind of actions do you want a response to? Do you have a GUI? A curses-b

Re: Function name unchanged in error message

2010-01-30 Thread Peter Otten
Gabriel Genellina wrote: > En Fri, 29 Jan 2010 13:09:40 -0300, Michele Simionato > escribió: > >> On Jan 29, 2:30 pm, andrew cooke wrote: >>> Is there any way to change the name of the function in an error >>> message? In the example below I'd like the error to refer to bar(), >>> for example