ANN: Release of SimPy2.1.0beta (Simulation in Python)

2010-05-12 Thread Klaus G. Muller
It is my pleasure to announce the release of SimPy 2.1.0beta. It is ready for download at https://sourceforge.net/projects/simpy/. It is published for community testing. SimPy 2.1.0 is a major new version, with a refactored code base, two powerful API additions, additional documentation

Re: First Timer

2010-05-12 Thread Mensanator
On May 11, 9:32 pm, Terry Reedy tjre...@udel.edu wrote: On 5/11/2010 7:03 PM, Mensanator wrote: On May 11, 4:37 pm, Terry Reedytjre...@udel.edu  wrote: In the command line interpreter, you should be able to hit up arrow and have the line above copied to the current entry line for

Re: Extract all words that begin with x

2010-05-12 Thread Bryan
Terry Reedy wrote: Thank you for that timing report. Enjoyed doing it, and more on that below. My main point is that there are two ways to fetch a char, the difference being the error return -- exception IndexError versus error value ''. This is an example of out-of-band versus in-band

Re: Iterating over dict and removing some elements

2010-05-12 Thread Bryan
Terry Reedy wrote: [...] for k in [k for k in d if d[k] == 'two']:          d.pop(k) We have a winner. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating over dict and removing some elements

2010-05-12 Thread Rebelo
On 05/11/2010 05:08 PM, Ulrich Eckhardt wrote: Hi! I wrote a simple loop like this: d = {} ... for k in d: if some_condition(d[k]): d.pop(k) If I run this, Python complains that the dictionary size changed during iteration. I understand that the iterator relies on

Re.: reading xml from python - Sum-up

2010-05-12 Thread Hvidberg, Martin
Thanks to all - Just to give a positive feed back. The following solution works for me: from xml.etree.ElementTree import ElementTree tree = ElementTree() tree.parse('inifile.xml') dicIni = dict((child.tag, child.text) for child in tree.getroot().getchildren()) :-) Martin This email is

Re: Upgrade Python 2.6.4 to 2.6.5

2010-05-12 Thread Werner F. Bruhin
On 11/05/2010 23:13, Martin v. Loewis wrote: When will it install into system32? When you install for all users. Did the upgrade inform you that it was an upgrade, or did it warn you that you would overwrite the previous installation? It warned me that there is a previous

Re: Picking a license

2010-05-12 Thread Lie Ryan
On 05/12/10 06:50, Patrick Maupin wrote: On May 11, 5:34 am, Paul Boddie p...@boddie.org.uk wrote: On 10 Mai, 20:36, Patrick Maupin pmau...@gmail.com wrote: The fact is, I know the man would force me to pay for the chocolate, so in some cases that enters into the equation and keeps me from

Re: Python-list Digest, Vol 80, Issue 108

2010-05-12 Thread varahalu 2400
please dont send mails From: python-list-requ...@python.org python-list-requ...@python.org To: python-list@python.org Sent: Wed, 12 May, 2010 12:00:02 AM Subject: Python-list Digest, Vol 80, Issue 108 Note: Forwarded message is attached. Send Python-list

Re: accessing superclass methods from subclass

2010-05-12 Thread Bruno Desthuilliers
Chris Rebert a écrit : (snip) Here is how I would rewrite your example: class Shape(object): def __init__(self, x=0, y=0): self.x = x self.y = y @property def location(self): return (self.x, self.y) @location.setter def location(self, val):

Re: Iterating over dict and removing some elements

2010-05-12 Thread Bryan
Rebelo wrote: i am wondering why not like this:   d = {1: 'one', 2: 'two', 3: 'three'}   for k,v in d.items(): ...     if k==1: ...          del d[k] ...   d {2: 'two', 3: 'three'}   Mostly because there's no reason to get 'v' if you're not going to use it. That may be just because you

Re: HTTP Post Request

2010-05-12 Thread kak...@gmail.com
On May 12, 6:13 am, Kushal Kumaran kushal.kumaran+pyt...@gmail.com wrote: On Tue, May 11, 2010 at 3:59 PM, kak...@gmail.com kak...@gmail.com wrote: On May 11, 10:56 am, kak...@gmail.com kak...@gmail.com wrote: On May 11, 5:06 am, Kushal Kumaran kushal.kumaran+pyt...@gmail.com wrote: On

encoding issue (cp720)

2010-05-12 Thread M. Bashir Al-Noimi
Hi All, I'm still a newbie in Python (I started learn it yesterday) and I faced a huge problem cuz python always crashes because of encoding issue! Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: cp720 so I filed a bug report

Re: Is Python a functional programming language?

2010-05-12 Thread Alia Khouri
Paul Rubin: I like learnyouahaskell.com if you want to get some exposure to Haskell, probably the archetypal functional language these days.  I've been fooling with it on and off for the past couple years.  I'm still not convinced that it's that good a vehicle for practical general purpose

Re: open(False) in python3

2010-05-12 Thread Johan Förberg
On Tue, 11 May 2010 19:27:37 -0300, Gabriel Genellina wrote: so open(False) is the same as open(0), and 0 is the file descriptor associated to standard input. The program isn't hung, it's just waiting for you to type some text That's interesting. Are there any more numbered pseudofiles? I

Re: virtualenvwrapper for Windows (Powershell)

2010-05-12 Thread Guillermo
On May 12, 4:31 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 973ca0fa-4a2f-4e3b-91b9-e38917885...@d27g2000yqc.googlegroups.com, Guillermo wrote: On May 11, 7:43 am, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message

Re: how to import a module for global use in a library package ?

2010-05-12 Thread Jean-Michel Pichavant
Terry Reedy wrote: On 5/11/2010 8:04 AM, Auré Gourrier wrote: I might make one submodule for imports and then do 'from rootlib.util import importmod as m' in the template. But I have no need now for such. Terry Jan Reedy We did that, and we so regret it. After 5 years of intensive dev on

Re: Extract all words that begin with x

2010-05-12 Thread Stefan Behnel
Bryan, 12.05.2010 08:55: Now back to the arguably-interesting issue of speed in the particular problem here: 'Superpollo' had suggested another variant, which I appended to my timeit targets, resulting in: [s for s in strs if s.startswith('a')] took: 5.68393977159 [s for s in strs if s[:1] ==

Re: virtualenvwrapper for Windows (Powershell)

2010-05-12 Thread Lawrence D'Oliveiro
In message a52501e4-ebfa-46dd-aece-1e0273bc9...@n15g2000yqf.googlegroups.com, Guillermo wrote: On May 12, 4:31 am, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 973ca0fa-4a2f-4e3b-91b9-e38917885...@d27g2000yqc.googlegroups.com, Guillermo wrote: On May 11, 7:43

Re: open(False) in python3

2010-05-12 Thread Stefan Behnel
Johan Förberg, 12.05.2010 10:05: On Tue, 11 May 2010 19:27:37 -0300, Gabriel Genellina wrote: so open(False) is the same as open(0), and 0 is the file descriptor associated to standard input. The program isn't hung, it's just waiting for you to type some text That's interesting. Are there

Re: open(False) in python3

2010-05-12 Thread Christian Heimes
Johan Förberg every: That's interesting. Are there any more numbered pseudofiles? I suppose its mainly an excellent way to confuse people when you open(0).read(), but it would be interesting to know. All opened files (and on Unix even network sockets, epoll queues, inotify handlers etc) have

Re: Extract all words that begin with x

2010-05-12 Thread Stefan Behnel
superpollo, 11.05.2010 17:03: Aahz ha scritto: In article mailman.11.1273548189.32709.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: On 5/10/2010 5:35 AM, James Mills wrote: On Mon, May 10, 2010 at 6:50 PM, Xavier Hocont...@xavierho.com wrote: Have I missed something, or

Re: Extract all words that begin with x

2010-05-12 Thread superpollo
Stefan Behnel ha scritto: superpollo, 11.05.2010 17:03: Aahz ha scritto: In article mailman.11.1273548189.32709.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: On 5/10/2010 5:35 AM, James Mills wrote: On Mon, May 10, 2010 at 6:50 PM, Xavier Hocont...@xavierho.com wrote: Have I

client to upload big files via https and get progress info

2010-05-12 Thread News123
Hi, I'd like to perform huge file uploads via https. I'd like to make sure, - that I can obtain upload progress info (sometimes the nw is very slow) - that (if the file exceeds a certain size) I don't have to read the entire file into RAM. I found Active states recipe 146306, which constructs

Re: Why the inconsistent of those two base64 methods?

2010-05-12 Thread Maarten
On May 12, 6:04 am, Leo Jay python.leo...@gmail.com wrote: I'd like to encode a string in base64, but I found a inconsistent of two methods: 'aaa'.encode('base64') 'YWFh\n' import base64 base64.b64encode('aaa') 'YWFh' as you can see, the result of 'aaa'.encode('base64') has a '\n'

Re: encoding issue (cp720)

2010-05-12 Thread Lie Ryan
On 05/12/10 18:43, M. Bashir Al-Noimi wrote: Hi All, I'm still a newbie in Python (I started learn it yesterday) and I faced a huge problem cuz python always crashes because of encoding issue! Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown

Re: strange interaction between open and cwd

2010-05-12 Thread Albert van der Horst
In article hro17v$3l...@reader1.panix.com, Grant Edwards inva...@invalid.invalid wrote: SNIP Still, at the time, it _seemed_ like a good way to share a directory of source code amongst multiple projects. I don't remember why symlinks wouldn't accomplish the task -- something to do with RCS...

Re:[SOLVED] encoding issue (cp720)

2010-05-12 Thread M. Bashir Al-Noimi
Hi Lie, On 12/05/2010 12:14 م, Lie Ryan wrote: On 05/12/10 18:43, M. Bashir Al-Noimi wrote: Hi All, I'm still a newbie in Python (I started learn it yesterday) and I faced a huge problem cuz python always crashes because of encoding issue! Fatal Python error: Py_Initialize: can't

Re: Iterating over dict and removing some elements

2010-05-12 Thread Adi Eyal
-- Forwarded message -- From: Bryan bryanjugglercryptograp...@yahoo.com To: python-l...@python.org Date: Tue, 11 May 2010 23:59:29 -0700 (PDT) Subject: Re: Iterating over dict and removing some elements Terry Reedy wrote: [...] for k in [k for k in d if d[k] == 'two']:    

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 11 Mai, 22:39, Patrick Maupin pmau...@gmail.com wrote: OK.  Now I'm REALLY confused.  I said Certainly RMS carefully lays out that the LGPL should be used sparingly in his Why you shouldn't use the Lesser GPL for your next library post.  (Hint: he's not suggesting a permissive license

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 11 Mai, 23:02, Patrick Maupin pmau...@gmail.com wrote: Huh? Permissive licenses offer much better certainty for someone attempting a creative mash-up.  Different versions of the Apache license don't conflict with each other.  If I use an MIT-licensed component, it doesn't attempt to make

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 11 Mai, 22:50, Patrick Maupin pmau...@gmail.com wrote: On May 11, 5:34 am, Paul Boddie p...@boddie.org.uk wrote: Yes, *if* you took it. He isn't forcing you to take it, though, is he? No,  but he said a lot of words that I didn't immediately understand about what it meant to be free and

How to add callbacks that is the same function with different argument in Tkinter python26?

2010-05-12 Thread chen zeguang
code is in the end. I want to print different number when pressing different button. Yet the program outputs 8 no matter which button is pressed. I guess it's because the callback function is not established untill the button is pressed, and i has already reached to 8. then How to add callbacks

Re: How to add callbacks that is the same function with different argument in Tkinter python26?

2010-05-12 Thread Jean-Michel Pichavant
chen zeguang wrote: code is in the end. I want to print different number when pressing different button. Yet the program outputs 8 no matter which button is pressed. I guess it's because the callback function is not established untill the button is pressed, and i has already reached to 8.

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 7:10 am, Paul Boddie p...@boddie.org.uk wrote: On 11 Mai, 22:39, Patrick Maupin pmau...@gmail.com wrote: OK.  Now I'm REALLY confused.  I said Certainly RMS carefully lays out that the LGPL should be used sparingly in his Why you shouldn't use the Lesser GPL for your next

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 11, 10:06 pm, Lie Ryan lie.1...@gmail.com wrote: The point is, GPL (and OWL) is for programmers who just don't care about the legal stuffs and would want to spend more time writing code than writing license. Absolutely. When I wrote permissive license I was not trying to imply that

Need help using callables and setup in timeit.Timer

2010-05-12 Thread Matthew Wilson
I want to time some code that depends on some setup. The setup code looks a little like this: b = range(1, 1001) And the code I want to time looks vaguely like this: sorted(b) Except my code uses a different function than sorted. But that ain't important right now. Anyhow, I know

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 7:26 am, Paul Boddie p...@boddie.org.uk wrote: On 11 Mai, 23:02, Patrick Maupin pmau...@gmail.com wrote: Huh? Permissive licenses offer much better certainty for someone attempting a creative mash-up.  Different versions of the Apache license don't conflict with each other.  If I

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 7:43 am, Paul Boddie p...@boddie.org.uk wrote: On 11 Mai, 22:50, Patrick Maupin pmau...@gmail.com wrote: On May 11, 5:34 am, Paul Boddie p...@boddie.org.uk wrote: Yes, *if* you took it. He isn't forcing you to take it, though, is he? No,  but he said a lot of words that I

Re: Upgrade Python 2.6.4 to 2.6.5

2010-05-12 Thread Michel Claveau - MVP
Hi! If you are under Vista, or Windows 7, have you unactivate UAC, before the update? @+ MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 2:19 am, Lie Ryan lie.1...@gmail.com wrote: On 05/12/10 06:50, Patrick Maupin wrote: On May 11, 5:34 am, Paul Boddie p...@boddie.org.uk wrote: On 10 Mai, 20:36, Patrick Maupin pmau...@gmail.com wrote:  The fact is, I know the man would force me to pay for the chocolate, so

Re: How to add callbacks that is the same function with different argument in Tkinter python26?

2010-05-12 Thread Dave Angel
Jean-Michel Pichavant wrote: chen zeguang wrote: code is in the end. I want to print different number when pressing different button. Yet the program outputs 8 no matter which button is pressed. I guess it's because the callback function is not established untill the button is pressed, and i

Re: Extract all words that begin with x

2010-05-12 Thread Aahz
In article mailman.100.1273653829.32709.python-l...@python.org, Stefan Behnel stefan...@behnel.de wrote: superpollo, 11.05.2010 17:03: Aahz ha scritto: In article mailman.11.1273548189.32709.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: On 5/10/2010 5:35 AM, James Mills wrote:

Re: Extract all words that begin with x

2010-05-12 Thread Stefan Behnel
Aahz, 12.05.2010 17:33: Stefan Behnelstefan...@behnel.de wrote: superpollo, 11.05.2010 17:03: Aahz ha scritto: In articlemailman.11.1273548189.32709.python-l...@python.org, Terry Reedytjre...@udel.edu wrote: On 5/10/2010 5:35 AM, James Mills wrote: On Mon, May 10, 2010 at 6:50 PM, Xavier

Re: Extract all words that begin with x

2010-05-12 Thread Terry Reedy
On 5/12/2010 11:33 AM, Aahz wrote: also, what if the OP intended words that begin with x with x a string (as opposed to a single character) ? word[:len(x)] == x will work in that case. But that's now going to be slower. ;-) (Unless one makes the obvious optimization to hoist len(x)

Re: open(False) in python3

2010-05-12 Thread geremy condra
On Wed, May 12, 2010 at 1:36 AM, Stefan Behnel stefan...@behnel.de wrote: Johan Förberg, 12.05.2010 10:05: On Tue, 11 May 2010 19:27:37 -0300, Gabriel Genellina wrote: so open(False) is the same as open(0), and 0 is the file descriptor associated to standard input. The program isn't hung,

Re: Why the inconsistent of those two base64 methods?

2010-05-12 Thread Mensanator
On May 12, 4:20 am, Maarten maarten.sn...@knmi.nl wrote: On May 12, 6:04 am, Leo Jay python.leo...@gmail.com wrote: I'd like to encode a string in base64, but I found a inconsistent of two methods: 'aaa'.encode('base64') 'YWFh\n' import base64 base64.b64encode('aaa') 'YWFh'

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 12 Mai, 16:45, Patrick Maupin pmau...@gmail.com wrote: On May 12, 7:43 am, Paul Boddie p...@boddie.org.uk wrote: Thus, owned my soul joins holy war and Bin Laden on the list. That rhetorical toolbox is looking pretty empty at this point. Not emptier than you analogy toolbox.  This is

Re: open(False) in python3

2010-05-12 Thread Giampaolo Rodolà
2010/5/12 Gabriel Genellina gagsl-...@yahoo.com.ar: open() in Python 3 does a lot of things; it's like a mix of codecs.open() + builtin open() + os.fdopen() from 2.x all merged together. It does different things depending on the type and quantity of its arguments, and even returns objects of

Do any debuggers support edit and continue?

2010-05-12 Thread Joel Koltner
Just curious... in Microsoft's Visual Studio (and I would presume some other tools), for many languages (both interpreted and compiled!) there's an edit and conitnue option that, when you hit a breakpoint, allows you to modify a line of code before it's actually executed. Does any Python

RE: Do any debuggers support edit and continue?

2010-05-12 Thread Sandy Sandy
good question I also looking for debugging tools like Matlab in Python do you know how to stop in breakpoint investigate the variables by using graphics in figures and continue the mutter is: during debugging the debug processes stacks when fig is created for example, in code import random

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 12 Mai, 16:10, Patrick Maupin pmau...@gmail.com wrote: On May 12, 7:10 am, Paul Boddie p...@boddie.org.uk wrote: What the licence asks you to do and what the author of the licence wants you to do are two separate things. But the whole context was about what RMS wanted me to do and you

Re: open(False) in python3

2010-05-12 Thread Kushal Kumaran
On Wed, May 12, 2010 at 10:56 PM, Giampaolo Rodolà g.rod...@gmail.com wrote: 2010/5/12 Gabriel Genellina gagsl-...@yahoo.com.ar: open() in Python 3 does a lot of things; it's like a mix of codecs.open() + builtin open() + os.fdopen() from 2.x all merged together. It does different things

How to test whether bit is set within a flag with Python ?

2010-05-12 Thread robert somerville
I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in C) unsigned char a = 6; is 3rd bit set ?? a 4 =, true in

Re: How to? epydoc --top=README

2010-05-12 Thread Phlip
On May 10, 1:29 pm, Phlip phlip2...@gmail.com wrote: Pythonistas: I have a question to epydoc-devel, but it might be languishing: http://sourceforge.net/mailarchive/forum.php?thread_name=l2n860c114f1... How do you populate the index.html output with your (insanely clever) contents of your

Re: open(False) in python3

2010-05-12 Thread Terry Reedy
On 5/12/2010 1:26 PM, Giampaolo Rodolà wrote: 2010/5/12 Gabriel Genellinagagsl-...@yahoo.com.ar: open() in Python 3 does a lot of things; it's like a mix of codecs.open() + builtin open() + os.fdopen() from 2.x all merged together. It does different things depending on the type and quantity of

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 12:17 pm, Paul Boddie p...@boddie.org.uk wrote: On 12 Mai, 16:45, Patrick Maupin pmau...@gmail.com wrote: On May 12, 7:43 am, Paul Boddie p...@boddie.org.uk wrote: Thus, owned my soul joins holy war and Bin Laden on the list. That rhetorical toolbox is looking pretty empty at

Re: open(False) in python3

2010-05-12 Thread Dave Angel
Giampaolo Rodolà wrote: 2010/5/12 Gabriel Genellina gagsl-...@yahoo.com.ar: open() in Python 3 does a lot of things; it's like a mix of codecs.open() + builtin open() + os.fdopen() from 2.x all merged together. It does different things depending on the type and quantity of its arguments,

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread MRAB
robert somerville wrote: I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in C) unsigned char a = 6; is 3rd

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Stef Mientki
On 12-05-2010 19:42, Joel Koltner wrote: Just curious... in Microsoft's Visual Studio (and I would presume some other tools), for many languages (both interpreted and compiled!) there's an edit and conitnue option that, when you hit a breakpoint, allows you to modify a line of code before it's

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Terry Reedy
On 5/12/2010 1:42 PM, Joel Koltner wrote: Just curious... in Microsoft's Visual Studio (and I would presume some other tools), for many languages (both interpreted and compiled!) there's an edit and conitnue option that, when you hit a breakpoint, allows you to modify a line of code before it's

Re: Limitation of os.walk

2010-05-12 Thread kj
In mailman.86.1273631889.32709.python-l...@python.org Tim Chase writes: 05/11/2010 09:07 PM, Terry Reedy wrote: If os.walk were rewritten, it should be as an iterator (generator). Directory entry and exit functions could still be added as params. It *is* an iterator/generator. However, I

Re: Picking a license

2010-05-12 Thread Lie Ryan
On 05/13/10 00:53, Patrick Maupin wrote: On May 12, 2:19 am, Lie Ryan lie.1...@gmail.com wrote: On 05/12/10 06:50, Patrick Maupin wrote: On May 11, 5:34 am, Paul Boddie p...@boddie.org.uk wrote: On 10 Mai, 20:36, Patrick Maupin pmau...@gmail.com wrote: The fact is, I know the man would

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Joel Koltner
Terry Reedy tjre...@udel.edu wrote in message news:mailman.119.1273690025.32709.python-l...@python.org... CPython compiles Python code (a sequence of statements) to its private bytecode (a sequence of codes and operands) and then interprets the bytecode. So 'edit and continue' would have to

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread cjw
On 12-May-10 14:40 PM, MRAB wrote: robert somerville wrote: I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in C)

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 1:00 pm, Paul Boddie p...@boddie.org.uk wrote: On 12 Mai, 16:10, Patrick Maupin pmau...@gmail.com wrote: On May 12, 7:10 am, Paul Boddie p...@boddie.org.uk wrote: What the licence asks you to do and what the author of the licence wants you to do are two separate things. But

Re: Limitation of os.walk

2010-05-12 Thread kj
In mailman.82.1273630064.32709.python-l...@python.org Terry Reedy tjre...@udel.edu writes: On 5/11/2010 3:49 PM, kj wrote: PS: I never understood why os.walk does not support hooks for key events during such a tree traversal. Either 1) it is intentionally simple, with the expectation that

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Lie Ryan
On 05/13/10 03:42, Joel Koltner wrote: Just curious... in Microsoft's Visual Studio (and I would presume some other tools), for many languages (both interpreted and compiled!) there's an edit and conitnue option that, when you hit a breakpoint, allows you to modify a line of code before it's

Queue.Queue() AttributeError exception

2010-05-12 Thread 钟炳勇
I have a multi-thread program work with Queue.Queue(), sometimes put request to the work queue, but throw an exception as below traceback information, it will always throw the exception until restart program, cound please have any experience, your help will be greatly appreciated! File

Re: Picking a license

2010-05-12 Thread Ed Keith
--- On Mon, 5/10/10, Ben Finney ben+pyt...@benfinney.id.au wrote: So I object to muddying the issue by misrepresenting the source of that force. Whatever force there is in copyright comes from law, not any free software license. You are the one muddying the waters. It does not mater

Re: plot debugging problem

2010-05-12 Thread Matteo Landi
On Tue, May 11, 2010 at 8:59 PM, Sandy Sandy c...@live.com wrote: 1 remember to include the list, what does it mean?? I mean that you are leaving out the mlist from your answers. Instead of press _reply_, look for a _reply-to-all_ button. 2 do you mean Pseudo Color Plots in

python list digest

2010-05-12 Thread Biyana, D. (Dugmore)
Hi All! I have a huge file and I want to extract subtext starting with {1: and ending with -} inclusive. This subtext recurs in many places in the file and I want the resultant to be in some output file. Any suggestions about the best way forward. Nedbank Limited Reg No

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Phlip
On May 12, 10:42 am, Joel Koltner zapwiredashgro...@yahoo.com wrote: Does any Python debugger support this feature? I have worked for 3 years by now in Python and have never once debugged. People who need edit and continue probably need developer tests instead. You typically edit the test a

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Joel Koltner
Phlip phlip2...@gmail.com wrote in message news:d580dece-bd42-4753-a0c6-783ce69b5...@m31g2000pre.googlegroups.com... People who need edit and continue probably need developer tests instead. You typically edit the test a little, run all the code, edit the code a little, run all the code, and

Re: open(False) in python3

2010-05-12 Thread Martin v. Loewis
geremy condra wrote: On Wed, May 12, 2010 at 1:36 AM, Stefan Behnel stefan...@behnel.de wrote: Johan Förberg, 12.05.2010 10:05: On Tue, 11 May 2010 19:27:37 -0300, Gabriel Genellina wrote: so open(False) is the same as open(0), and 0 is the file descriptor associated to standard input. The

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Phlip
On May 12, 12:44 pm, Joel Koltner zapwiredashgro...@yahoo.com wrote: I find myself making mistakes in typing the name of classes and/or methods when I'm first getting started with them (there are some thousands of them after all, and even of commonly used classes/methods you're probably

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Joel Koltner
Phlip phlip2...@gmail.com wrote in message news:75c050d2-365e-4b08-8716-884ed5473...@k25g2000prh.googlegroups.com... On May 12, 12:44 pm, Joel Koltner zapwiredashgro...@yahoo.com wrote: Are you implying that you then run the code, and - after a handful of higher-level calls - control flow gets

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Phlip
On May 12, 1:38 pm, Joel Koltner zapwiredashgro...@yahoo.com wrote: Well, sure, that is the current fix... but an edit and continue feature would make for a much faster fix. :-) Are you implying, after an edit, you need to start a program again, then enter several user inputs, to navigate back

Re: Do any debuggers support edit and continue?

2010-05-12 Thread John Nagle
Joel Koltner wrote: Just curious... in Microsoft's Visual Studio (and I would presume some other tools), for many languages (both interpreted and compiled!) there's an edit and conitnue option that, when you hit a breakpoint, allows you to modify a line of code before it's actually executed.

RE: Do any debuggers support edit and continue?

2010-05-12 Thread Sandy Sandy
maybe ipython? http://showmedo.com/videos/video?name=120fromSeriesID=100 From: zapwiredashgro...@yahoo.com Subject: Do any debuggers support edit and continue? Date: Wed, 12 May 2010 10:42:31 -0700 To: python-list@python.org Just curious... in Microsoft's Visual Studio (and I

fails to call python from jython for types, functools, csv modules

2010-05-12 Thread Joax Spec
Hello I'm very new to python/jython, and trying yo *call a program from jython*, which works very good in python. I got some issues which resolve as I expose here, but I think these are unsatisfactory solutions. If you want to reply please do it to my address. thanks, Jx PD. both are great

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Joel Koltner
Phlip phlip2...@gmail.com wrote in message news:c014ae9f-99d8-4857-a3f7-e6ac16e45...@e34g2000pra.googlegroups.com... Are you implying, after an edit, you need to start a program again, then enter several user inputs, to navigate back to the place where you hit the syntax error? (WxWidgets noted

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Joel Koltner
John Nagle na...@animats.com wrote in message news:4beb15c5$0$1634$742ec...@news.sonic.net... Having actually used LISP systems with edit and continue, it's a good thing that Python doesn't have it. It encourages a patch mentality, and the resulting code is usually disappointing. Hey, a

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Phlip
On May 12, 3:03 pm, Joel Koltner zapwiredashgro...@yahoo.com wrote: Pretty much, yeah... Realistically, we're probably talking less than a minute each time, so objectively it's not really a big deal -- it's just different than what I'm used to so I'm noticing it more. :-) I guess what I'm

Re: Limitation of os.walk

2010-05-12 Thread Patrick Maupin
On May 12, 2:04 pm, kj no.em...@please.post wrote: petpeeveIt seems that a similar simplicity argument was invoked to strip the cmp option from sort in Python 3.  G.  Simplicity is great, but when the drive for it starts causing useful functionality to be thrown out, then it is going too

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 12 Mai, 21:02, Patrick Maupin pmau...@gmail.com wrote: On May 12, 1:00 pm, Paul Boddie p...@boddie.org.uk wrote: [Quoting himself...] Not least because people are only obliged to make their work available under a GPL-compatible licence so that people who are using the combined work may

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread Mensanator
On May 12, 1:40 pm, MRAB pyt...@mrabarnett.plus.com wrote: robert somerville wrote: I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing

Re: open(False) in python3

2010-05-12 Thread Jan Kaliszewski
Terry Reedy dixit (2010-05-12, 14:26): On 5/12/2010 1:26 PM, Giampaolo Rodolà wrote: 2010/5/12 Gabriel Genellinagagsl-...@yahoo.com.ar: open() in Python 3 does a lot of things; it's like a mix of codecs.open() + builtin open() + os.fdopen() from 2.x all merged together. It does different

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 12 Mai, 20:29, Patrick Maupin pmau...@gmail.com wrote: But nobody's whining about the strings attached to the software.  Just pointing out why they sometimes won't use a particular piece of software, and pointing out that some other people (e.g. random Ubuntu users) might not understand

Re: Picking a license

2010-05-12 Thread Paul Boddie
On 11 Mai, 14:12, Ed Keith e_...@yahoo.com wrote: --- On Mon, 5/10/10, Ben Finney ben+pyt...@benfinney.id.au wrote: So I object to muddying the issue by misrepresenting the source of that force. Whatever force there is in copyright comes from law, not any free software license. You are

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 5:41 pm, Paul Boddie p...@boddie.org.uk wrote: Ahh, well done.  You've sucked me into a meaningless side debate.  If I'm not distributing readline, then legally the license distribution terms don't apply to me.  End of story.  (Morally, now we might get into how trivial it is or

Re: Picking a license

2010-05-12 Thread Patrick Maupin
On May 12, 6:15 pm, Paul Boddie p...@boddie.org.uk wrote: On 12 Mai, 20:29, Patrick Maupin pmau...@gmail.com wrote: But nobody's whining about the strings attached to the software.  Just pointing out why they sometimes won't use a particular piece of software, and pointing out that some

Re: Is Python a functional programming language?

2010-05-12 Thread Lawrence D'Oliveiro
In message pan.2010.05.11.20.07.09.579...@nowhere.com, Nobody wrote: On Tue, 11 May 2010 23:13:10 +1200, Lawrence D'Oliveiro wrote: But the beauty is that Python is multi-paradigm ... The trouble with “multi-paradigm” is that it offends the zealots on all sides. Is that how you view

Re: documentation bug? (format spec mini language)

2010-05-12 Thread Alan G Isaac
On 5/11/2010 5:05 PM, Terry Reedy wrote: http://bugs.python.org/issue8691 Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread Jess
Cheap Chanel Watches for sale at: http://www.luxuryowner.net/ Chanel Watches collection: http://www.luxuryowner.net/replica-chanel-watches.html Chanel J12 Automatic Watches: http://www.luxuryowner.net/Chanel-J12-Automatic-Watches.html Chanel J12 Quartz Watches:

Re: Do any debuggers support edit and continue?

2010-05-12 Thread Jess
Cheap Chanel Watches for sale at: http://www.luxuryowner.net/ Chanel Watches collection: http://www.luxuryowner.net/replica-chanel-watches.html Chanel J12 Automatic Watches: http://www.luxuryowner.net/Chanel-J12-Automatic-Watches.html Chanel J12 Quartz Watches:

buffer objects (C-API)

2010-05-12 Thread moerchendiser2k3
Hi at all, is it possible that a buffer object deallocates the memory when the object is destroyed? I want to wrap the buffer object around some memory. Or is there any chance that the buffer object copies the memory so it will be responsible when it will be destroyed? Thanks in advance, bye.

Re: open(False) in python3

2010-05-12 Thread Terry Reedy
On 5/12/2010 7:07 PM, Jan Kaliszewski wrote: Terry Reedy dixit (2010-05-12, 14:26): On 5/12/2010 1:26 PM, Giampaolo Rodolà wrote: 2010/5/12 Gabriel Genellinagagsl-...@yahoo.com.ar: open() in Python 3 does a lot of things; it's like a mix of codecs.open() + builtin open() + os.fdopen() from

Re: Limitation of os.walk

2010-05-12 Thread Terry Reedy
On 5/12/2010 2:52 PM, kj wrote: Inmailman.86.1273631889.32709.python-l...@python.org Tim Chase writes: 05/11/2010 09:07 PM, Terry Reedy wrote: If os.walk were rewritten, it should be as an iterator (generator). Directory entry and exit functions could still be added as params. It *is* an

Re: buffer objects (C-API)

2010-05-12 Thread Carl Banks
On May 12, 7:33 pm, moerchendiser2k3 googler. 1.webmas...@spamgourmet.com wrote: Hi at all, is it possible that a buffer object deallocates the memory when the object is destroyed? I want to wrap the buffer object around some memory. Or is there any chance that the buffer object copies the

  1   2   >