Re: Array programming

2005-05-06 Thread Sakesun Roykiattisak
V.C.Sekhar wrote: >Hi there, > I couldnt get to do the following task using Python. Can some pls >suggest me a way to do this. > >I have an array with duplicate strings filled in it. Now am looking for >a way to extract only the DISTINCT Values from that array. > >Could some one pls help me ou

Array programming

2005-05-06 Thread V.C.Sekhar
Hi there, I couldnt get to do the following task using Python. Can some pls suggest me a way to do this. I have an array with duplicate strings filled in it. Now am looking for a way to extract only the DISTINCT Values from that array. Could some one pls help me out. Thanks in advance, Sekh

Re: Found python for delphi new web site

2005-05-06 Thread James
I didn't either since it needs some components to be installed. I will surely try playing with the source. It should be a lot easier to customerize than other IDEs. I just installed the binary http://mmm-experts.com/Downloads.aspx?ProductId=4 It does have code insight in the interpreter, but not

Reg strip_tags function in Python.

2005-05-06 Thread praba kar
Dear All, In Php I can use strip_tags() function to strip out all html tags. I want to know that strip_tags() equivalent function in Python. regards praba Yahoo! India Matrimony: Find your life partner online Go to: http:

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-06 Thread Xah Lee
erratum: the correct URL is: http://xahlee.org/perl-python/python_re-write/lib/module-re.html Xah [EMAIL PROTECTED] â http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Found python for delphi new web site

2005-05-06 Thread could ildg
I haven't compile the PyScripter IDE project yet. Does it support code-insight? On 6 May 2005 22:28:59 -0700, James <[EMAIL PROTECTED]> wrote: > It has been around for a while now. But I am glad I visited it again. > The new PyScripter IDE is great. They should really announce new > software like

Re: Found python for delphi new web site

2005-05-06 Thread James
It has been around for a while now. But I am glad I visited it again. The new PyScripter IDE is great. They should really announce new software like these here. -- http://mail.python.org/mailman/listinfo/python-list

Found python for delphi new web site

2005-05-06 Thread could ildg
http://mmm-experts.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Listening to changes in a C++ variable from python

2005-05-06 Thread Jeremy Bowers
On Fri, 06 May 2005 19:56:34 -0700, lamthierry wrote: > Let's say I have the following source code in C++: > > // The following is in a .cpp file > > int val = 0; > for ( int i = 0; i < 10; i++ ) >val = i; > > > // Now I'm in a python GUI, glade or GTK > Is it possible from the GUI side to

Re: hard memory limits

2005-05-06 Thread Maurice LING
John Machin wrote: > On Sat, 07 May 2005 02:29:48 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: > > >>On Sat, 07 May 2005 11:08:31 +1000, Maurice LING <[EMAIL PROTECTED]> wrote: >> >>>It doesn't seems to help. I'm thinking that it might be a SOAPpy >>>problem. The allocation fails when I grab a

Re: hard memory limits

2005-05-06 Thread John Machin
On Sat, 07 May 2005 02:29:48 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: >On Sat, 07 May 2005 11:08:31 +1000, Maurice LING <[EMAIL PROTECTED]> wrote: >> >>It doesn't seems to help. I'm thinking that it might be a SOAPpy >>problem. The allocation fails when I grab a list of more than 150k >>ele

Listening to changes in a C++ variable from python

2005-05-06 Thread lamthierry
Let's say I have the following source code in C++: // The following is in a .cpp file int val = 0; for ( int i = 0; i < 10; i++ ) val = i; // Now I'm in a python GUI, glade or GTK Is it possible from the GUI side to listen to changes in the val variable? Once I notice a change in the variabl

Re: Reference to self not passed to member function

2005-05-06 Thread Bengt Richter
On Sat, 7 May 2005 01:06:31 +0200, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >James Stroud wrote: > >> I did this: >> >> py> class bob(object): >> ... def __init__(self,**kwargs): >> ... for fname,func in kwargs.items(): >> ... setattr(self, fname, lambda *args : func(*args)) >> ... >

Re: how to make a LAN game using python?

2005-05-06 Thread Terry Reedy
"flyaflya" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want make a desktop game suports LAN connect, but pygame has nothing > about network.How to let pygame suport LAN connect? have you some > examples or articles about LAN connect? The discussions on the pygame mailing list

Re: hard memory limits

2005-05-06 Thread Bengt Richter
On Sat, 07 May 2005 11:08:31 +1000, Maurice LING <[EMAIL PROTECTED]> wrote: >James Stroud wrote: > >> Sorry Maurice, apparently in bash its "ulimit" (no n). I don't use bash, so >> I >> don't know all of the differences offhand. Try that. >> >> James > >Thanks guys, > >It doesn't seems to help.

Re: how to make a LAN game using python?

2005-05-06 Thread Peter Hansen
flyaflya wrote: > I want make a desktop game suports LAN connect, but pygame has nothing > about network.How to let pygame suport LAN connect? have you some > examples or articles about LAN connect? Pygame wouldn't bother supporting that, since it's already fully supported by standard Python, a

Re: hard memory limits

2005-05-06 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> > So why would Apple insist on setting unusably low process limits, when >> > the others don't? >> >> You're making an unwarranted assumption here - that the OP wasn't >> creating a large process of some kind. > > You need a spec

how to make a LAN game using python?

2005-05-06 Thread flyaflya
I want make a desktop game suports LAN connect, but pygame has nothing about network.How to let pygame suport LAN connect? have you some examples or articles about LAN connect? -- http://mail.python.org/mailman/listinfo/python-list

Re: hard memory limits

2005-05-06 Thread Maurice LING
James Stroud wrote: > Sorry Maurice, apparently in bash its "ulimit" (no n). I don't use bash, so I > don't know all of the differences offhand. Try that. > > James Thanks guys, It doesn't seems to help. I'm thinking that it might be a SOAPpy problem. The allocation fails when I grab a list o

Re: py2exe + svn - the final drama

2005-05-06 Thread Timothy Smith
David Bolen wrote: >Timothy Smith <[EMAIL PROTECTED]> writes: > > > >>what i do is as soon as the update is complete i close the app, but it >>still gives the error, i tried clear() after update and before it, it >>still got the same error. it's be nice to not have to fiddle around >>with the zi

Re: annonymous functions -- how to

2005-05-06 Thread Dave Benjamin
Peter Hansen wrote: > Dave Benjamin wrote: > >> def add_thingy(): >> def func(thingy_id): >> print 'got thingy id:', thingy_id >> def funnc(doodad_id): >> print 'got doodad id:', doodad_id >> def func(thingy_doodad): >> print 'thingy dood

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-06 Thread Xah Lee
HTML Problems in Python Doc I don't know what kind of system is used to generate the Python docs, but it is quite unpleasant to work with manually, as there are egregious errors and inconsistencies. For example, on the âModule Contentsâ page ( http://python.org/doc/2.4.1/lib/node111.html ), the c

Re: hard memory limits

2005-05-06 Thread James Tanis
James Stroud wrote: >Sorry Maurice, apparently in bash its "ulimit" (no n). I don't use bash, so I >don't know all of the differences offhand. Try that. > > The only shells I know of that uses unlimit is csh & tcsh.. bleh.. :) FWIW, I've had the same problem in openbsd, while ulimit will fix

Re: py2exe + svn - the final drama

2005-05-06 Thread David Bolen
Timothy Smith <[EMAIL PROTECTED]> writes: > what i do is as soon as the update is complete i close the app, but it > still gives the error, i tried clear() after update and before it, it > still got the same error. it's be nice to not have to fiddle around > with the zip file, i really think makin

Re: Reference to self not passed to member function

2005-05-06 Thread James Stroud
Thanks to both Scott and Fredrik. James On Friday 06 May 2005 04:22 pm, Scott David Daniels wrote: > James Stroud wrote: > > Hello All, > > > > I did this: > > > > py> class bob(object): > > ... def __init__(self,**kwargs): > > ... for fname,func in kwargs.items(): > > ... setattr(sel

Re: Reference to self not passed to member function

2005-05-06 Thread Scott David Daniels
James Stroud wrote: > Hello All, > > I did this: > > py> class bob(object): > ... def __init__(self,**kwargs): > ... for fname,func in kwargs.items(): > ... setattr(self, fname, lambda *args : func(*args)) > ... > py> def doit(): > ... print "wuzzup?" > ... > py> abob = bob(doit=doi

Re: py2exe + svn - the final drama

2005-05-06 Thread David Bolen
Just <[EMAIL PROTECTED]> writes: > the zipimport module has an attr called _zip_directory_cache, which is a > dict you can .clear(). Still, reloading modules is hairy at best, its > probably easiest to relaunch your app when the .zip file has changed. Except that he's getting an error during th

Re: Reference to self not passed to member function

2005-05-06 Thread Fredrik Lundh
James Stroud wrote: > I did this: > > py> class bob(object): > ... def __init__(self,**kwargs): > ... for fname,func in kwargs.items(): > ... setattr(self, fname, lambda *args : func(*args)) > ... > py> def doit(): > ... print "wuzzup?" > ... > py> abob = bob(doit=doit) > py> > py> a

Re: py2exe + svn - the final drama

2005-05-06 Thread Timothy Smith
Just wrote: >In article <[EMAIL PROTECTED]>, > David Bolen <[EMAIL PROTECTED]> wrote: > > > >>Are you perhaps trying to update the zip file in-place while it is still >>being used by the application? I'm not sure that's a safe operation. >> >> > >I'm sure it's not :) > >[lots of useful hel

ANN: RUR-PLE version 0.8

2005-05-06 Thread André Roberge
RUR-PLE is a "Python Learning Environment". It contains four main elements: 1. Lessons viewable within an incorporated browser. Version 0.8 includes 25 lessons introducing Python. 2. A "robot world" with a robot that can accomplish tasks through Python programs. 3. A built-in interpreter which c

Re: Getting number of iteration

2005-05-06 Thread Fredrik Lundh
Mike Meyer wrote: > > n = 0 > > for x in lst: > > print "iteration %d on element %s" % (n, x) > > n += 1 > > Just for the record, the old idiom was: > > for n in xrange(len(lst)): > x = lst[n] > print "iteration %d on element %s" % (n, x) it was? of the following four solutions,

Re: Reference to self not passed to member function

2005-05-06 Thread [EMAIL PROTECTED]
I think it is more clear to rephrase your code as: -#!/usr/bin/env python -class bob(object): -def __init__(self,**kwargs): -print kwargs -for fname,func in kwargs.items(): -setattr(self, fname, lambda *args : func(*args)) - -def doit(): -print "wuzzup?" - - -abo

Re: hard memory limits

2005-05-06 Thread James Stroud
Sorry Maurice, apparently in bash its "ulimit" (no n). I don't use bash, so I don't know all of the differences offhand. Try that. James On Friday 06 May 2005 03:02 pm, Maurice LING wrote: > Hi everyone, > > thanks for your help. > > Yes, I'm using Mac OSX 1.3 with 256MB Ram. Each element in the

Re: hard memory limits

2005-05-06 Thread Fredrik Lundh
Mike Meyer wrote: > > So why would Apple insist on setting unusably low process limits, when > > the others don't? > > You're making an unwarranted assumption here - that the OP wasn't > creating a large process of some kind. You need a special license to create large processes on a Mac? I click

Reference to self not passed to member function

2005-05-06 Thread James Stroud
Hello All, I did this: py> class bob(object): ... def __init__(self,**kwargs): ... for fname,func in kwargs.items(): ... setattr(self, fname, lambda *args : func(*args)) ... py> def doit(): ... print "wuzzup?" ... py> abob = bob(doit=doit) py> py> abob.doit() wuzzup? Much to my su

Re: py2exe + svn - the final drama

2005-05-06 Thread Just
In article <[EMAIL PROTECTED]>, David Bolen <[EMAIL PROTECTED]> wrote: > Are you perhaps trying to update the zip file in-place while it is still > being used by the application? I'm not sure that's a safe operation. I'm sure it's not :) [lots of useful help snipped] the zipimport module has

Re: hard memory limits

2005-05-06 Thread Mike Meyer
Maurice LING <[EMAIL PROTECTED]> writes: > Hi everyone, > > thanks for your help. > > Yes, I'm using Mac OSX 1.3 with 256MB Ram. Each element in the list is > a float. The list is actually a retrieved results of document IDs from > SOAP interface. And Mac OSX does not have 'unlimit' command as sho

Re: min max of a list

2005-05-06 Thread Steven Bethard
Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > >> I get a syntax error in : >> >> py> [(min((abs(p - v), v) for v in valleys + [0] if v < p)[1], >> ... p, >> ... min((abs(p - v), v) for v in valleys if v > p)[1]) >> ... for p in peaks] > > > I think we already covered the part where you

Re: hard memory limits

2005-05-06 Thread Maurice LING
Hi everyone, thanks for your help. Yes, I'm using Mac OSX 1.3 with 256MB Ram. Each element in the list is a float. The list is actually a retrieved results of document IDs from SOAP interface. And Mac OSX does not have 'unlimit' command as shown, Maurice-Lings-Computer:~ mauriceling$ unlimit -

Re: Multiple Inheritence and data attributes

2005-05-06 Thread [EMAIL PROTECTED]
Two things: - A call to super doesn't make senseif a class is not derived, and class b seems superfuous. - Code below is a working example of your code, the way you did it it generates an error. -#!/usr/bin/env python -class A(object): -def __init__(self): -super(A, self).__init__() -

handling more databases with ZEO

2005-05-06 Thread Almad
Hello, I'm using zodb with zeo and I want to connect to more databases from my application. On server side, it's no problem, I just set up second filestorage: path /var/www/databases/zodb/almad-net.fs path /var/www/databases/zodb/azilla.fs However, I dunno how to connect fr

Re: hard memory limits

2005-05-06 Thread John Machin
On Fri, 06 May 2005 18:24:21 +1000, Maurice LING <[EMAIL PROTECTED]> wrote: >Hi, > >I think I've hit a system limit in python when I try to construct a list >of 200,000 elements. My error is > >malloc: vm_allocate (size = 2400256) failed.. > >Just wondering is this specific to my system or wh

Re: win32: structured storage

2005-05-06 Thread tlviewer
"Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > tlviewer wrote: > > > Is there another way to parse the central directory out of > > a CHM file? > > google("chmlib python") Anyone know the calling syntax for the functions? PythonWin 2.3.2 (#49, Nov 13 2003, 10:34:54

Re: py2exe + svn - the final drama

2005-05-06 Thread David Bolen
Timothy Smith <[EMAIL PROTECTED]> writes: > Timothy Smith wrote: (...) > >zipimport.ZipImportError: bad local file header in Z:\temp\library.zip > > > > not that once i have finished client.update(''), it has successfully > > updated the zipfile, i open a dialoge box saying "click ok and > > resta

Re: hard memory limits

2005-05-06 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > James Stroud wrote: > >> > does Mac OS X ship with memory limits set by default? isn't that >> > a single-user system? >> >> Dear original poster or whoever is interested in OS X: >> >> OS X is not a single user system. It is BSD based unix. And its [

Re: win32: structured storage

2005-05-06 Thread Dave Benjamin
Dave Benjamin wrote: > Steve Holden wrote: > >> tlviewer wrote: >> >> > CHM is supposed to be structured storage (ITSF). If a given CHM >> > file is infected it most likely has an embedded EXE file -- mine >> > had one called [Open.exe]. >> > >> Ironic, really, since Microsoft insist that the

Re: Running python cgi scripts that require external cvs under apache

2005-05-06 Thread Noah
How do you run the cvs binary from your script? If this is a simple CGI that calls os.popen() or os.system() then the cvs binary is most likely running as the same user as the Apache HTTP server (usually someone like "nobody", "apache", or "www"). http://cgiwrap.unixtools.org/ is one solution. Al

Multiple Inheritence and data attributes

2005-05-06 Thread Derek Basch
Hello Everyone, Given: class A: def __init__(self): super(A, self).__init__() self.dog = "fluffy" def changeDog(self): self.dog = "spike" class B: def __init__(self): super(B, self).__init__() class C(object, A, B): def __init__(self): sup

Re: min max of a list

2005-05-06 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I get a syntax error in : > > py> [(min((abs(p - v), v) for v in valleys + [0] if v < p)[1], > ... p, > ... min((abs(p - v), v) for v in valleys if v > p)[1]) > ... for p in peaks] I think we already covered the part where you were using an older version of Pyth

Re: annonymous functions -- how to

2005-05-06 Thread Peter Hansen
Dave Benjamin wrote: > def add_thingy(): > def func(thingy_id): > print 'got thingy id:', thingy_id > def funnc(doodad_id): > print 'got doodad id:', doodad_id > def func(thingy_doodad): > print 'thingy doodad created, froobling...' >

Re: Getting number of iteration

2005-05-06 Thread Mike Meyer
Bill Mill <[EMAIL PROTECTED]> writes: > On 5/6/05, Florian Lindner <[EMAIL PROTECTED]> wrote: >> Hello, >> when I'm iterating through a list with: >> >> for x in list: >> >> how can I get the number of the current iteration? > Earlier: > > n = 0 > for x in lst: > print "iteration %d on eleme

Re: [HELP] Tkinter Application Minimized to System Tray :)

2005-05-06 Thread Jeff Epler
Tk, the library that Tkinter wraps, does not offer a way to "minimize to the taskbar". Jeff pgp3ATXnxg0dO.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: min max of a list

2005-05-06 Thread querypk
oh yes its the same case. even [0,4,9,2,0] as a set [2,6] and may be not [2,7]. Its not that you are wrong its jus that I was not clear. Sorry about that. -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-06 Thread Jeff Epler
To add to what others have said: * Typos and lack of spell-checking, such as "occurances" vs "occurrences" * Poor grammar, such as "Other characters that has special meaning includes:" * You dropped version-related notes like "New in version 2.4" * You seem to love the use of s, while docs.py

Re: win32: structured storage

2005-05-06 Thread Dave Benjamin
Steve Holden wrote: > tlviewer wrote: > > > CHM is supposed to be structured storage (ITSF). If a given CHM > > file is infected it most likely has an embedded EXE file -- mine > > had one called [Open.exe]. > > > Ironic, really, since Microsoft insist that the browser must be > fully-integra

Re: min max of a list

2005-05-06 Thread querypk
I get a syntax error in : py> [(min((abs(p - v), v) for v in valleys + [0] if v < p)[1], ... p, ... min((abs(p - v), v) for v in valleys if v > p)[1]) ... for p in peaks] -- http://mail.python.org/mailman/listinfo/python-list

Re: min max of a list

2005-05-06 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hi Kent, > Thanks for that. But We are considering [..., 0, 101, 0, 0, 0, 0, 0] -> > [13,18] .In fact if you look at the list, the histogram ends at 15 that > is [0,101,0] --> [13,15]. Dont you think so. > Well you consider ..., 0, 4, 9, 2, 0, 0, ... as an int

Running python cgi scripts that require external cvs under apache

2005-05-06 Thread chris . levis
All: I have written a Python webapp under MS IIS 5.0 that does the following: -Does a CVS checkout of a particular bit of xml -Gets a list of valid cvs tags for that xml file -Based on user input via forms, modifies that xml -CVS checkin's that file To have correct

Re: min max of a list

2005-05-06 Thread querypk
Hi Kent, Thanks for that. But We are considering [..., 0, 101, 0, 0, 0, 0, 0] -> [13,18] .In fact if you look at the list, the histogram ends at 15 that is [0,101,0] --> [13,15]. Dont you think so. -- http://mail.python.org/mailman/listinfo/python-list

Re: hard memory limits

2005-05-06 Thread James Stroud
On Friday 06 May 2005 11:27 am, Fredrik Lundh wrote: > James Stroud wrote: > > > does Mac OS X ship with memory limits set by default? isn't that > > > a single-user system? > > > > Dear original poster or whoever is interested in OS X: > > > > OS X is not a single user system. It is BSD based uni

Re: min max of a list

2005-05-06 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > Hi Steve! > I am not sure if I was clear with my previous post .Ok let me rephrase > it . > > Assume the values list is the > content of a histogram. Then we see that > values = [ 0, 72, 2, 4, 9, 2, 0, 0, 42, 26, 0, 282, > 23, 0, 101, 0, 0, 0, 0

Re: inheritance with new-style classes - help

2005-05-06 Thread Terry Reedy
"Greg Copeland" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Okay, I have: [snip] >self._childAttrib = "child" ... > AttributeError: 'Child' object has no attribute '_childAttrib' x.__dict__ > {'_attrib': 'base'} > > What??! Where the heck did self._childAttrib go?

Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you are, nor if you are a church member, but are you saved? Are you sure you will go to Heaven when you die? GOOGLE·NEWSGROUP·POST·156

2005-05-06 Thread Please
Abuse reports to [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: hard memory limits

2005-05-06 Thread Fredrik Lundh
James Stroud wrote: > > does Mac OS X ship with memory limits set by default? isn't that > > a single-user system? > > Dear original poster or whoever is interested in OS X: > > OS X is not a single user system. It is BSD based unix. And its [EMAIL > PROTECTED] > sweet! (Though I'm u

Re: Tons of stats/opens to non-existing files increases Python's startupon loaded NFS servers

2005-05-06 Thread Dieter Maurer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes on Fri, 6 May 2005 00:08:36 +0200: > > ... lots of "no such file or directory ... > > Whoa!! After looking at what is being stat'd or > > open'd, it looks like 'encodings' is new in 2.4 and, > > even "worse", everything is looked for as a zip first. > > s

Re: inheritance with new-style classes - help

2005-05-06 Thread Greg Copeland
Doh! Child's __init__ was declared as __init(). Fixing that took care of it! Sorry for wasting the bandwidth! Cheers, Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: inheritance with new-style classes - help

2005-05-06 Thread Greg Copeland
BTW, this is on Python 2.3.4. -- http://mail.python.org/mailman/listinfo/python-list

Re: min max of a list

2005-05-06 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > If this is the list. > > values = [ 0, 72, 0, 4, 9, 2, 0, 0, 42, 26, 0, 282, > 23, 0, 101, 0, 0, 0, 0, 0] > > as we can see there are peaks in the list.that is 0,72,0 is a > group(triangle) with peak 72.then 0, 4, 9, 2, 0, 0 with pe

inheritance with new-style classes - help

2005-05-06 Thread Greg Copeland
Okay, I have: class Base( object ): def __init__( self ): self._attrib = "base" print "Base" def real( self ): print "Base.real() is calling base.virtual()" self.virtual() def virtual( self ): print "Base virtual()" pass class Mothe

Re: hard memory limits

2005-05-06 Thread James Stroud
On Friday 06 May 2005 10:29 am, Fredrik Lundh wrote: > Mike Meyer wrote: > > Without platform information, it's hard to say. On a modern Unix > > system, you only run into system resource limits when the system is > > heavily loaded. Otherwise, you're going to hit per-process limits. In > > the lat

Re: annonymous functions -- how to

2005-05-06 Thread Dave Benjamin
Fredrik Lundh wrote: > Dave Benjamin wrote: > >>>so name them all "func" or "next" or something, so you don't have >>>to think. once the object is bound, the name is irrlevant. >> >>Sure, you could do this, but then you'd have multiple functions at >>different nesting levels with the same name, w

Re: hard memory limits

2005-05-06 Thread Fredrik Lundh
Mike Meyer wrote: > Without platform information, it's hard to say. On a modern Unix > system, you only run into system resource limits when the system is > heavily loaded. Otherwise, you're going to hit per-process limits. In > the latter case, adding RAM or swap won't help at all. Raising the >

SC-Corporate-ID released

2005-05-06 Thread Philippe C. Martin
Dear all, I am very pleased to announce the release of SC-Corporate-ID. SC-Corporate-ID is a commercial Smart Card security system that can be extended by the user using the Python language. SC-Corporate-ID is written in Python and wxPython for the most part (except for the PCSC wrapper, the GIN

Re: Weird UserArray AttributeError (bug ?)

2005-05-06 Thread George Sakkis
To answer my own question, the error is caused by the __setattr__ defined in UserArray: def __setattr__(self,attr,value): if attr=='shape': self.array.shape=value self.__dict__[attr]=value I'm not sure though how to "undefine" __setattr__ in a subclass so that property

Re: annonymous functions -- how to

2005-05-06 Thread Fredrik Lundh
Dave Benjamin wrote: > > so name them all "func" or "next" or something, so you don't have > > to think. once the object is bound, the name is irrlevant. > > Sure, you could do this, but then you'd have multiple functions at > different nesting levels with the same name, which would be confusing.

Re: Python at MS Event!

2005-05-06 Thread James
Standard. 2.4.x -- http://mail.python.org/mailman/listinfo/python-list

Re: annonymous functions -- how to

2005-05-06 Thread Dave Benjamin
Fredrik Lundh wrote: > Dave Benjamin wrote: > >>In this case, having to name these callback functions is tiring and >>awkward, and (IMHO) disrupts the flow of my function: > > so name them all "func" or "next" or something, so you don't have > to think. once the object is bound, the name is irrl

Re: a cx_Oracle ORA-01036 problem

2005-05-06 Thread Miles
Damjan wrote: > I'm using Python 2.4, cx_Oracle-4.1 on Linux with Oracle instant client > 10.1.0.3. This is the sql string: > > SQL = """insert into D.D_NOTIFY values (:CARDREF, :BANKKEY, :OK1, :OK2 \ > :DEBTEUR, :DEBTDEN, to_date(:INVOICE_DATE,'DD.MM.YY'), > to_date(:PAYMENT_DEADL

Re: How to detect a double's significant digits

2005-05-06 Thread Jeremy Bowers
On Fri, 06 May 2005 08:27:03 +0200, Fredrik Lundh wrote: > Jeremy Bowers wrote: > >> > A step which will require him to tell the printing routine how many >> > digits he wants printed. >> >> Not necessarily; consider the str() of a float in Python, especially >> given the "significant digits" asp

Re: min max of a list

2005-05-06 Thread querypk
Hi Steve! I am not sure if I was clear with my previous post .Ok let me rephrase it . Assume the values list is the content of a histogram. Then we see that values = [ 0, 72, 2, 4, 9, 2, 0, 0, 42, 26, 0, 282, 23, 0, 101, 0, 0, 0, 0, 0] 1 is repeated 72 times, 3 -> 4 t

Re: Best way to convert a list into function call arguments?

2005-05-06 Thread bruno modulix
[EMAIL PROTECTED] wrote: > I'm a newcomer to python - what is the best way to convert a list into > a function call agruments? Jeff Epler already answered to the question. Now a couple of advices: > For example: > > list = (2005, 5, 5) 1/ this is not a list, it's a tuple. A list would be [2005,

Re: annonymous functions -- how to

2005-05-06 Thread Scott David Daniels
Fredrik Lundh wrote: > > so name them all "func" or "next" or something, so you don't have > to think. once the object is bound, the name is irrlevant. > Or, you could tell him about the reserved word anonymous which can be used to created unnamed functions of values. A sample definition and use

Re: Getting number of iteration

2005-05-06 Thread George Sakkis
"Florian Lindner" wrote: > Hello, > when I'm iterating through a list with: > > for x in list: > > how can I get the number of the current iteration? > > Thx, > > Florianfor in python 2.3+: for i,x in enumerate(sequence): print "sequence[%d] = %s" %(i,x) George -- http://mail.python.org/

Re: Getting number of iteration

2005-05-06 Thread Bill Mill
On 5/6/05, Bill Mill <[EMAIL PROTECTED]> wrote: > On 5/6/05, Florian Lindner <[EMAIL PROTECTED]> wrote: > > Hello, > > when I'm iterating through a list with: > > > > for x in list: > > > > how can I get the number of the current iteration? > > Python 2.4 and greater: ummm, make that 2.3 and grea

Re: Getting number of iteration

2005-05-06 Thread Bill Mill
On 5/6/05, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello, > when I'm iterating through a list with: > > for x in list: > > how can I get the number of the current iteration? Python 2.4 and greater: for n, x in enumerate(lst): print "iteration %d on element %s" % (n, x) Earlier: n = 0

Getting number of iteration

2005-05-06 Thread Florian Lindner
Hello, when I'm iterating through a list with: for x in list: how can I get the number of the current iteration? Thx, Florian -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption with Python?

2005-05-06 Thread Ivan Voras
Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong file encryption in Python? Any > modern block cipher will do: AES, Blowfish, etc. I'm not looking

Re: Python & SQLite

2005-05-06 Thread Gerhard Häring
dcrespo wrote: >>There are specific python modules for SQLite on Linux. > > Which? I thought pysqlite works on Linux. Sure. What he probably meant was that there are binary installers for pysqlite from various Linux distributions (Debian, Gentoo, ...). > My important question is: If I develop a

Re: hard memory limits

2005-05-06 Thread Bill Mill
On 5/6/05, Mike Meyer <[EMAIL PROTECTED]> wrote: > "Fredrik Lundh" <[EMAIL PROTECTED]> writes: > > > Maurice LING wrote: > >> Will adding more RAM helps in this case? > > > > probably. more swap space might also help. or you could use a > > smarter malloc package. posting more details on your p

Re: ERP & CRM in Python

2005-05-06 Thread Wolfgang Keller
Hello, and thanks for your reply. > We are writing a script to render a PDF from our doc. (using > openreport.org) Good to read. > > Why not mailing lists instead of online-"forums". > There is some mailing lists; > http://tinyerp.org/lists.php > ... but nobody uses it. > > > The former was ma

Re: hard memory limits

2005-05-06 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Maurice LING wrote: >> Will adding more RAM helps in this case? > > probably. more swap space might also help. or you could use a > smarter malloc package. posting more details on your platform, > toolchain, python version, and list building approac

Re: Setting the corner color in rotated PIL images

2005-05-06 Thread rzed
"Anthra Norell" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > What do you mean 'is required'? I tend to think that getting > ahead with a job is what is required. I don't sneer at > work-arounds if they save time. > > Frederic > > A somewhat craftier solution, if still pretty hackish,

[HELP] Tkinter Application Minimized to System Tray :)

2005-05-06 Thread 陈 阳
I write a program with Python 2.4 + Tkinter Execute it, there will be a window show something. If I minimize it, it will be minimized to the taskbar. But I would like it to miniminze to the System Tray, this can make taskbar more clear. Would you please tell me how to modify my program.

Re: Python & SQLite

2005-05-06 Thread dcrespo
> There are specific python modules for SQLite on Linux. Which? I thought pysqlite works on Linux. My important question is: If I develop an app using Python-wxPython-PySQLite under Windows, and run it on Linux, it should work, ¿right? Daniel -- http://mail.python.org/mailman/listinfo/python-l

Re: How to detect a double's significant digits

2005-05-06 Thread John Roth
"mrstephengross" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all... How can I find out the number of significant digits (to the > right of the decimal place, that is) in a double? At least, I *think* > that's what I'm asking for. For instance: > > 0.103 --> 3 > 0.0103 --> 4 >

Tkinter App to System Tray

2005-05-06 Thread 陈阳
I write a program with Python 2.4 + TkinterExecute it, there will be a window show something.If I minimize it, it will be minimized to the taskbar. But I would like it to miniminze to the System Tray, this can make taskbar more clear. Would you please tell me how to modify my program.

Re: Setting the corner color in rotated PIL images

2005-05-06 Thread Fredrik Lundh
"rzed" wrote: > I'm using PIL to generate some images which may be rotated at the > user's option. When they are rotated, the original image is cropped > in the new image (which is fine), and the corners are black (which > is not, in this case). I can't find any documented way to change > the defa

Re: py2exe + svn - the final drama

2005-05-06 Thread Timothy Smith
Timothy Smith wrote: >ok, i am updating my program from my svn - this works, however, i am >getting the following error when i close the program. the zip file >successfully updates, so i'm curious as to the meaning of this. > >Traceback (most recent call last): > File "Main.pyo", line 820, in V

Re: Setting the corner color in rotated PIL images

2005-05-06 Thread rzed
[Following up] > - Original Message - > From: "rzed" <[EMAIL PROTECTED]> > Newsgroups: comp.lang.python > To: > Sent: Sunday, May 01, 2005 1:17 PM > Subject: Setting the corner color in rotated PIL images > > >> I'm using PIL to generate some images which may be rotated at >> the user's

Re: win32: structured storage

2005-05-06 Thread Robert Kern
tlviewer wrote: > Is there another way to parse the central directory out of > a CHM file? google("chmlib python") -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mai

  1   2   >