hai

2010-12-28 Thread sakthivel vel
webpage : http://123maza.com/35/city149/ -- http://mail.python.org/mailman/listinfo/python-list

hai how are you

2010-12-28 Thread sakthivel vel
webpage : http://123maza.com/35/city149/ -- http://mail.python.org/mailman/listinfo/python-list

mutiprocessing, manager, list & threading ?

2010-12-28 Thread mika . saari
Hi, Testing if I could be able to use multiprocessing BaseManager to manage list of instance pointers between processes. If my intance inherits Thread, I get pickling error about _thread.lock. I found Steven Bethard's recipe for this kind of problem in http://bytes.com/topic/python/answers/5

Python - NAWIT / Community

2010-12-28 Thread flebber
I just wanted to put out a question about IDE's but this is NAWIT - not another which ide thread. My question relates to community contribution. My concern arose when recently installing the pydev.org extensions in Eclipse. Now as far as my understanding goes the licensing on both is open source G

Re: Python - NAWIT / Community

2010-12-28 Thread Adam Tauno Williams
On Tue, 2010-12-28 at 02:26 -0800, flebber wrote: > Can't help thinking they open sourced Pydev so they could bench it. So? That isn't uncommon at all; to Open Source when you've moved on. > I started thinking that the only consistent env each python person has > is idle as it ships in the ins

Re: Python - NAWIT / Community

2010-12-28 Thread flebber
On Dec 28, 10:16 pm, Adam Tauno Williams wrote: > On Tue, 2010-12-28 at 02:26 -0800, flebber wrote: > > Can't help thinking they open sourced Pydev so they could bench it. > > So?  That isn't uncommon at all;  to Open Source when you've moved on. > > > I started thinking that the only consistent e

Re: Python - NAWIT / Community

2010-12-28 Thread flebber
On Dec 28, 10:24 pm, flebber wrote: > On Dec 28, 10:16 pm, Adam Tauno Williams > wrote: > > > > > On Tue, 2010-12-28 at 02:26 -0800, flebber wrote: > > > Can't help thinking they open sourced Pydev so they could bench it. > > > So?  That isn't uncommon at all;  to Open Source when you've moved on

Re: Python - NAWIT / Community

2010-12-28 Thread Adam Tauno Williams
On Tue, 2010-12-28 at 03:24 -0800, flebber wrote: > On Dec 28, 10:16 pm, Adam Tauno Williams > wrote: > > On Tue, 2010-12-28 at 02:26 -0800, flebber wrote: > > > Is pydev actively being developed and for who? SPE is a great idea but > > > is Stan still developing? Pyscripter is good but not 64 cap

Re: Trying to parse a HUGE(1gb) xml file

2010-12-28 Thread Adam Tauno Williams
On Tue, 2010-12-28 at 07:08 +0100, Stefan Behnel wrote: > Roy Smith, 28.12.2010 00:21: > > To go back to my earlier example of > > FALSE > > using 432 bits to store 1 bit of information, stuff like that doesn't > > happen in marked-up text documents. Most of the file is CDATA (do they > >

Re: Python - NAWIT / Community

2010-12-28 Thread flebber
On Dec 28, 10:37 pm, Adam Tauno Williams wrote: > On Tue, 2010-12-28 at 03:24 -0800, flebber wrote: > > On Dec 28, 10:16 pm, Adam Tauno Williams > > wrote: > > > On Tue, 2010-12-28 at 02:26 -0800, flebber wrote: > > > > Is pydev actively being developed and for who? SPE is a great idea but > > >

Re: Python - NAWIT / Community

2010-12-28 Thread flebber
On Dec 28, 11:10 pm, flebber wrote: > On Dec 28, 10:37 pm, Adam Tauno Williams > wrote: > > > > > On Tue, 2010-12-28 at 03:24 -0800, flebber wrote: > > > On Dec 28, 10:16 pm, Adam Tauno Williams > > > wrote: > > > > On Tue, 2010-12-28 at 02:26 -0800, flebber wrote: > > > > > Is pydev actively be

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread Ulrich Eckhardt
Steven D'Aprano wrote: class InternedTuple(tuple): > ... _cache = {} > ... def __new__(cls, *args): > ... t = super().__new__(cls, *args) > ... return cls._cache.setdefault(t, t) That looks good. The only thing that first bothered me is that it creates an obje

Re: Python - NAWIT / Community

2010-12-28 Thread Steven D'Aprano
On Tue, 28 Dec 2010 04:10:15 -0800, flebber wrote: > Tony Robbins "Acheiving a goal is simple, decide what your goal is, set > out towards it and consistently review whether you are getting closer or > further from your goal and take action immediately." Writing bug-free code is simple: decide wh

Re: Trying to parse a HUGE(1gb) xml file

2010-12-28 Thread BartC
"Stefan Behnel" wrote in message news:mailman.335.1293516506.6505.python-l...@python.org... Roy Smith, 28.12.2010 00:21: To go back to my earlier example of FALSE using 432 bits to store 1 bit of information, stuff like that doesn't happen in marked-up text documents. Most of the

etl tool!!!!!

2010-12-28 Thread krishna kumar
Is there any efficient etl tool developed in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: etl tool!!!!!

2010-12-28 Thread Stefan Sonnenberg-Carstens
Am 28.12.2010 13:57, schrieb krishna kumar: Is there any efficient etl tool developed in python? Yes, Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: etl tool!!!!!

2010-12-28 Thread Adam Tauno Williams
On Tue, 2010-12-28 at 07:57 -0500, krishna kumar wrote: > Is there any efficient etl tool developed in python? What does "efficient" mean to you? I work on a Python workflow solution that I use to do ETL.

NameError: global name 'btn_Matlab' is not defined ?

2010-12-28 Thread Stef Mientki
hello, Never seen this before and I've no explanation whatsoever (Python 2.6) I've some dynamic generated code, one of objects generated is a wx.Button, called 'btn_Matlab'. After the code is generated, I can see that the button is created in the local namespace print locals()['btn_Matlab'

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread Steven D'Aprano
On Tue, 28 Dec 2010 13:42:39 +0100, Ulrich Eckhardt wrote: > Steven D'Aprano wrote: > class InternedTuple(tuple): >> ... _cache = {} >> ... def __new__(cls, *args): >> ... t = super().__new__(cls, *args) >> ... return cls._cache.setdefault(t, t) > > That looks

Re: NameError: global name 'btn_Matlab' is not defined ?

2010-12-28 Thread Steven D'Aprano
On Tue, 28 Dec 2010 14:34:19 +0100, Stef Mientki wrote: > hello, > > Never seen this before and I've no explanation whatsoever (Python 2.6) > > I've some dynamic generated code, > one of objects generated is a wx.Button, called 'btn_Matlab'. How do you generate the code? What code is generated

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread Stefan Behnel
Steven D'Aprano, 28.12.2010 15:11: On Tue, 28 Dec 2010 13:42:39 +0100, Ulrich Eckhardt wrote: Steven D'Aprano wrote: class InternedTuple(tuple): ... _cache = {} ... def __new__(cls, *args): ... t = super().__new__(cls, *args) ... return cls._cache.setdefault(t,

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread Christian Heimes
Am 28.12.2010 15:11, schrieb Steven D'Aprano: > # Untested > class InternedTuple(tuple): > _cache = {} > def __new__(cls, *args): > t = super().__new__(cls, *args) > return cls._cache.setdefault(args, t) > def __eq__(self, other): > return self is other > de

Replacing Greenlets with Threads or Processes

2010-12-28 Thread Nathanael Abbotts
I need to replace the use of 'greenlets' in an application with threads or processes, but as I've never used greenlets, I don't know where to start when replacing them. Could anyone explain to me how I can do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: while True or while 1

2010-12-28 Thread Francesco
hehehehehehe... On 17/12/2010 2.01, Steven D'Aprano wrote: On Thu, 16 Dec 2010 23:34:21 +, BartC wrote: In terms of a more realistic function (admittedly still a little contrived, as the loop would be written differently), I tried this: def p2(n): p=1 while True: if n<=p: retur

hi

2010-12-28 Thread phani indra
-- http://mail.python.org/mailman/listinfo/python-list

Re: Replacing Greenlets with Threads or Processes

2010-12-28 Thread Emile van Sebille
On 12/28/2010 6:59 AM Nathanael Abbotts said... I need to replace the use of 'greenlets' in an application with threads or processes, but as I've never used greenlets, I don't know where to start when replacing them. Could anyone explain to me how I can do this? Looks like your choice may be

Re: Trying to parse a HUGE(1gb) xml file

2010-12-28 Thread Sherm Pendley
"BartC" writes: >> Roy Smith, 28.12.2010 00:21: >>> To go back to my earlier example of >>> >>> FALSE >>> > > Isn't it possible for XML to define a shorter alias for these tags? Isn't > there a shortcut available for in simple examples like > this (I seem to remember something like this

Re: Replacing Greenlets with Threads or Processes

2010-12-28 Thread Nathanael Abbotts
Processes are better for me - the application is already multiprocessing based. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to parse a HUGE(1gb) xml file

2010-12-28 Thread Roy Smith
In article , "BartC" wrote: > Still, that's 27 times as much as it need be. Readability is fine, but why > does the full, expanded, human-readable textual format have to be stored on > disk too, and for every single instance? Well, I know the answer to that one. The particular XML feed I'm wo

Re: Replacing Greenlets with Threads or Processes

2010-12-28 Thread Nathanael Abbotts
That thread seems to deal with mixing them. I want to replace them completely - is that possible (with either threads or processes)? Some loss of functionality isn't a problem, as the code only seems to use the most basic features of Greenlets. -- http://mail.python.org/mailman/listinfo/python

Re: mutiprocessing, manager, list & threading ?

2010-12-28 Thread John Nagle
On 12/28/2010 1:38 AM, mika.sa...@wipsl.com wrote: Hi, Testing if I could be able to use multiprocessing BaseManager to manage list of instance pointers between processes. If my intance inherits Thread, I get pickling error about _thread.lock. The "multiprocessing" module works by runni

Re: Replacing Greenlets with Threads or Processes

2010-12-28 Thread Emile van Sebille
On 12/28/2010 8:07 AM Nathanael Abbotts said... That thread seems to deal with mixing them. I want to replace them completely - is that possible (with either threads or processes)? Are you working with pycsp? the info at http://code.google.com/p/pycsp/wiki/Getting_Started_With_PyCSP says: "

Re: How to programmatically exit from wsgi's serve_forever() loop

2010-12-28 Thread python
Hi Ian, You are correct - I missed the following 2 nuances: # need to set poll_interval in order to recognize shutdown request httpd.serve_forever(poll_interval=0.5) # shutdown request must be initiated from ANOTHER thread or will block import threading threading.Thread(target=httpd.shutdown).st

Re: Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA)

2010-12-28 Thread Anurag Chourasia
Dear all, I am required to use the Private Key from that XML below to generate a digital signature. The public key can then be used to validate the generated signature. http://stuvel.eu/rsa does not support PKCS#1 and hence I am required to look for alternates. Please let me know if there is so

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread John Nagle
On 12/27/2010 3:05 AM, Ulrich Eckhardt wrote: Hi! I'm trying to solve a computational problem and of course speed and size is important there. Then you probably shouldn't be using CPython. Apart from picking the right algorithm, I came across an idea that could help speed up things and k

Re: O'Reilly Python Certification

2010-12-28 Thread J. Altman
On 2010-12-16, Steve Holden wrote: > Each lesson required you to complete a practical assignment. You submit > these assignments for evaluation, and do not proceed to the next lesson > until your assignment reaches a satisfactory standard. Thus, less > experienced students will tend to have more i

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread Hrvoje Niksic
Christian Heimes writes: > Also this code is going to use much more memory than an ordinary tuple > since every instance of InternedTuple has a __dict__ attribute. This > code works but I had to move the cache outside the class because of > __slots__. Wouldn't it work inside the class as well?

Re: round in 2.6 and 2.7

2010-12-28 Thread Martin v. Loewis
>> "Float-to-string and string-to-float conversions are correctly rounded. >> The round() function is also now correctly rounded." >> >> Not sure that this is correct English; I think it means that the >> round() function is now correct. > > Well, the correct result of the example the OP gave woul

Re: Keeping track of the N largest values

2010-12-28 Thread Miki
> I'm processing a stream of N numbers and want to keep track of the K > largest. There's too many numbers in the stream (i.e. N is too large) > to keep in memory at once. K is small (100 would be typical). > ... deque can be bounded by maxsize, might fit the bill: >>> from collections imp

Re: Language Detection Library/Code

2010-12-28 Thread Katie T
On Tue, Dec 28, 2010 at 12:42 AM, Shashwat Anand wrote: > Regarding dictionary lookup+n-gram approach I didn't quite understand what > you wanted to say. Run through trigram analysis first, if it identified multiple languages as being matches within the error margin then split the text into words

Re: Replacing Greenlets with Threads or Processes

2010-12-28 Thread Nathanael Abbotts
On Tuesday, December 28, 2010 5:04:48 PM UTC, Emile van Sebille wrote: > On 12/28/2010 8:07 AM Nathanael Abbotts said... > > That thread seems to deal with mixing them. I want to replace them > > completely - is that possible (with either threads or processes)? > > Are you working with pycsp? the

Re: round in 2.6 and 2.7

2010-12-28 Thread Terry Reedy
On 12/28/2010 4:47 PM, Martin v. Loewis wrote: "Float-to-string and string-to-float conversions are correctly rounded. The round() function is also now correctly rounded." The second line was written to be parallel to the first, but the first is slightly ambiguous in that 'conversions' can ref

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread Christian Heimes
Am 28.12.2010 21:16, schrieb Hrvoje Niksic: > Christian Heimes writes: > >> Also this code is going to use much more memory than an ordinary tuple >> since every instance of InternedTuple has a __dict__ attribute. This >> code works but I had to move the cache outside the class because of >> __sl

Re: Interning own classes like strings for speed and size?

2010-12-28 Thread Rami Chowdhury
On Wed, Dec 29, 2010 at 00:45, Christian Heimes wrote: > Am 28.12.2010 21:16, schrieb Hrvoje Niksic: >> Christian Heimes writes: >> >>> Also this code is going to use much more memory than an ordinary tuple >>> since every instance of InternedTuple has a __dict__ attribute. This >>> code works bu

Re: Dynamic list name from a string

2010-12-28 Thread DevPlayer
# dynamic_named_obj.py # comp.lang.python # 2010-12 Dec-28 # Topic: Dynamic list name from a string Options # attempts to answer OP's question # DevPlayer - not a solution I'd use # TO Original Poster OP: # Start from the bottom OPTION, the one you requested. # Work your way up and see how it