Re: Tracking down memory leaks?

2006-02-13 Thread Christos Georgiou
On 12 Feb 2006 05:11:02 -0800, rumours say that "MKoool" <[EMAIL PROTECTED]> might have written: >I have an application with one function called "compute", which given a >filename, goes through that file and performs various statistical >analyses. It uses arrays extensively and loops alot. it pr

Re: OT: Another try at Python's selfishness

2006-02-13 Thread Christos Georgiou
On Thu, 9 Feb 2006 10:35:37 +0100, rumours say that "Frithiof Andreas Jensen" <[EMAIL PROTECTED]> might have written: >If one was trying to detect fanatics of any creed, a certain indicator would >be that they have absolutely no sense of humour - they suffer from a >yet-to-be-described variant of

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Terry Hancock
On Mon, 13 Feb 2006 18:27:40 -0800 Erik Max Francis <[EMAIL PROTECTED]> wrote: > Terry Hancock wrote: > > The only tuple I pronounce with the "-uh-" is "couple", > > and I usually call that a "two-tuple" when dealing with > > Python. > > I prefer the name _pair_ :-). Yeah, that works too. > > S

Splitting a string

2006-02-13 Thread Nico Grubert
Dear Python users, I'd like to split a string where 'and', 'or', 'and not' occurs. Example string: s = 'Smith, R. OR White OR Blue, T. AND Black AND Red AND NOT Green' I need to split s in order to get this list: ['Smith, R.', 'White', 'Blue, T.', 'Back', 'Red', 'Green'] Any idea, how I can spl

Re: Jedit

2006-02-13 Thread Lad
Pythonwin is not good,if you use non Ascii characters.I had to moved to Jedit. L.B -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding

2006-02-13 Thread Lad
Yes, 'some data'.decode('utf8').encode('windows-1250') works great. Thanks L.B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python very slow compared to C

2006-02-13 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > The "=" operator in Python ...doesn't exist, since '=' is not an operator in Python (just like it isn't, say, in VB). But, OK, you mean "assignment". > is also quite different from many language > people had experience like C Yes, but quite similar to assig

88k regex = RuntimeError

2006-02-13 Thread jodawi
I need to find a bunch of C function declarations by searching thousands of source or html files for thousands of known function names. My initial simple approach was to do this: rxAllSupported = re.compile(r"\b(" + "|".join(gAllSupported) + r")\b") # giving a regex of \b(AAFoo|ABFoo| (uh... 8

Logging hangs thread after detaching a StreamHandler's terminal

2006-02-13 Thread python-list . overbored
Hi all, After many hours, I think I've found a bug in the logging module! If you add a (stdout) StreamHandler to a logger, then detach the terminal for that stdout, subsequent calls to log() will hang the calling thread. To reproduce this, write the following scripts (this was a small test case

Re: Logging hangs thread after detaching a StreamHandler's terminal

2006-02-13 Thread python-list . overbored
Apologies, I seem to have sent this to the wrong list. (Though now that it's out here...any answers would be most welcome. :) On 2/14/06, I wrote: > Hi all, > > After many hours, I think I've found a bug in the logging module! > > If you add a (stdout) StreamHandler to a logger, then detach the >

any lib to generatre treemap?

2006-02-13 Thread oyster
I want to visualize my disk space like http://www.werkema.com/img/scrnshot/spacemonger.gif. ie. draw the directory as a big rectangle and its size is proportionable to the file size under this directory, then draw and fill small rectangles into it to behalf the size of every files. Is there a lib/s

Re: Jedit

2006-02-13 Thread Ravi Teja
ziggy wrote: > Just wondering if there is something out there like Jedit, but written > in python ( not just supporting, but actually written in it.. ) > > Nothing large like Stanzi's or Boa.. Just something quick and simple, > with code completion, and a debugger.. PythonWin, so long as you are

Re: Jedit

2006-02-13 Thread Kevin Walzer
ziggy wrote: > Just wondering if there is something out there like Jedit, but written > in python ( not just supporting, but actually written in it.. ) > > Nothing large like Stanzi's or Boa.. Just something quick and simple, > with code completion, and a debugger.. IDLE -- http://mail.python.

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Tim Hochberg
Erik Max Francis wrote: > Roy Smith wrote: > > >>A more interesting question is what do you call ()? A none-tuple? > > > Yeah, that's at the point where it _really_ departs from anything > remotely mathematical. Don't think I've ever heard the occasion to talk > about 0-tuples in any contex

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Erik Max Francis
Roy Smith wrote: > A more interesting question is what do you call ()? A none-tuple? Yeah, that's at the point where it _really_ departs from anything remotely mathematical. Don't think I've ever heard the occasion to talk about 0-tuples in any context, though, so I don't think it's something

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Erik Max Francis
Roy Smith wrote: > Peter Maas <[EMAIL PROTECTED]> wrote: >>Latin n-tuple >>--- >>... ... >>triplex triple >>duplexduple >>simplex simple > > Would a 9-tuple be a nipple? We don't talk about that anymore since the

Cygwin IDLE has no menu bar

2006-02-13 Thread Steve Holden
I just wondered whether anyone has seen this problem and fixed it. An IDLE with no menu bar isn't much use ... Python 2.4.1 (#1, May 27 2005, 18:02:40) [GCC 3.3.3 (cygwin special)] on cygwin Type "copyright", "credits" or "license()" for more information. [...] IDLE 1.1.1 >>> regard -- Steve Hol

Re: listing attributes

2006-02-13 Thread Evan Monroig
On Feb.13 18h37, Thomas Girod wrote : > Hi there. > > I'm trying to get a list of attributes from a class. The dir() function > seems to be convenient, but unfortunately it lists to much - i don't > need the methods, neither the built-in variables. If you do something like this you should have a

Re: listing attributes

2006-02-13 Thread James Stroud
Thomas Girod wrote: > Hi there. > > I'm trying to get a list of attributes from a class. The dir() function > seems to be convenient, but unfortunately it lists to much - i don't > need the methods, neither the built-in variables. > > In fact, all my variables are referencing to objects of the sa

Re: listing attributes

2006-02-13 Thread Peter Hansen
Thomas Girod wrote: > I'm trying to get a list of attributes from a class. The dir() function > seems to be convenient, but unfortunately it lists to much - i don't > need the methods, neither the built-in variables. > > In fact, all my variables are referencing to objects of the same type. > Can

Re: Loop Backwards

2006-02-13 Thread [EMAIL PROTECTED]
Dave wrote: > This should be simple, but I can't get it: > > How do you loop backwards through a list? > > For example, in, say, Javascript: > > for (var i = list.length - 1; i >=0; i--) { > do_stuff() > } > > I mean, I could reverse the list, but I don't want to. I want it to > stay exactly

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Roy Smith
Erik Max Francis <[EMAIL PROTECTED]> wrote: > (A 2-tuple is an "ordered pair" in mathematics.) If a 2-tuple is a > pair, then it would seem to follow that a 1-tuple is a single. Yeah, but an *ordered* single :-) A more interesting question is what do you call ()? A none-tuple? -- http://mail.

Re: Loop Backwards

2006-02-13 Thread skip
Dave> This should be simple, but I can't get it: Dave> How do you loop backwards through a list? Standard idiom: for i in range(len(mylist)-1, -1, -1): do_stuff() Contrast that with the standard forward loop: for i in range(len(mylist)): do_stuff() So, to go ba

Re: Python 2.4.2 and Berkeley DB 4.4.20 ?

2006-02-13 Thread skip
Damjan> This is from the Slackware-current changelog: Damjan> d/python-2.4.2-i486-1.tgz: Upgraded to python-2.4.2. Damjan>The bsddb module didn't build against the new 4.4.x Damjan>version of Berkeley DB. Does anyone care? Or perhaps have Damjan>a patch?

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Carl Cerecke
Erik Max Francis wrote: > Terry Hancock wrote: > >> I doubt that helps much: I pronounce all of those words >> (when I use them, which is not too often) as "-toopel". The >> only tuple I pronounce with the "-uh-" is "couple", and I >> usually call that a "two-tuple" when dealing with Python. > >

Re: Loop Backwards

2006-02-13 Thread bonono
[EMAIL PROTECTED] wrote: > Dave wrote: > > This should be simple, but I can't get it: > > > > How do you loop backwards through a list? > > > > For example, in, say, Javascript: > > > > for (var i = list.length - 1; i >=0; i--) { > > do_stuff() > > } > > > > I mean, I could reverse the list,

Re: Loop Backwards

2006-02-13 Thread Carl Cerecke
Dave wrote: > This should be simple, but I can't get it: > > How do you loop backwards through a list? > > For example, in, say, Javascript: > > for (var i = list.length - 1; i >=0; i--) { > do_stuff() > } > > I mean, I could reverse the list, but I don't want to. I want it to > stay exact

Re: invert the order of a string

2006-02-13 Thread Carl Cerecke
Eric McGraw wrote: >>Well, it turns out to be the best way to invert a string, IMO. The >>reversed() feature returns a reversed object... not a reversed string. >>In short, I have to fool with it again _after_ it has been inverted. The >>slicing takes care of the job right away and gives me what I

listing attributes

2006-02-13 Thread Thomas Girod
Hi there. I'm trying to get a list of attributes from a class. The dir() function seems to be convenient, but unfortunately it lists to much - i don't need the methods, neither the built-in variables. In fact, all my variables are referencing to objects of the same type. Can anyone suggest me a w

Re: Loop Backwards

2006-02-13 Thread Dave
Thanks! I knew it was simple... -- http://mail.python.org/mailman/listinfo/python-list

Re: invert the order of a string

2006-02-13 Thread Eric McGraw
> Well, it turns out to be the best way to invert a string, IMO. The > reversed() feature returns a reversed object... not a reversed string. > In short, I have to fool with it again _after_ it has been inverted. The > slicing takes care of the job right away and gives me what I want... no > Comput

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Erik Max Francis
Peter Maas wrote: > tuples are of latin origin, so one can derive the tuple words > systematically: > > Latin n-tuple > --- > ... ... > triplex triple > duplexduple > simplex simple Yeah but there's already plenty

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Erik Max Francis
Terry Hancock wrote: > I doubt that helps much: I pronounce all of those words > (when I use them, which is not too often) as "-toopel". The > only tuple I pronounce with the "-uh-" is "couple", and I > usually call that a "two-tuple" when dealing with Python. I prefer the name _pair_ :-). > I s

Loop Backwards

2006-02-13 Thread Dave
This should be simple, but I can't get it: How do you loop backwards through a list? For example, in, say, Javascript: for (var i = list.length - 1; i >=0; i--) { do_stuff() } I mean, I could reverse the list, but I don't want to. I want it to stay exactly the same, but I want to start at

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Erik Max Francis
Grant Edwards wrote: > Of course! What did you expect from devotees of a language > named after one of the greatest comedy shows in TV history? Seriously? Endless references to it until it gets painfully old :-(. The Python language, at least, has seemed to have gotten past that point in its h

Re: readlines and break apart based on letters

2006-02-13 Thread Kent Johnson
rtilley wrote: > Hi, > > While trying to better understand security descriptors on Windows. I've > been examining text-based security descriptors. I have the security > descriptors on individual lines stored in a text file. I want to break > these lines apart based on owner, group, dacl and sac

Re: ANN: PyGUI 1.6

2006-02-13 Thread DH
Wolfgang Keller wrote: > Hello, > > On Sun, 12 Feb 2006 07:50:56 +0100, greg wrote > (in article <[EMAIL PROTECTED]>): >> PyGUI is an experimental highly-Pythonic cross-platform >> GUI API. > > How "experimental" (or useable for productivity applications) would you > consider it compared to e.g.

Re: Jedit

2006-02-13 Thread ziggy
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > ziggy wrote: > > Just wondering if there is something out there like Jedit, but written > > in python ( not just supporting, but actually written in it.. ) > > > > Nothing large like Stanzi's or Boa.. Just something quick

Issues installing MySQL-python-0.3.5

2006-02-13 Thread keith
Hi, I am trying to use the Python MySQL APIs and have been attempting to install the above software. I am using MySQL 5.0.18-standard with Python 2.4.1 I get errors on the build. Some searching showed that one of the modules I was having issues with now has less arguments in my version of python

Re: Pythonic gui format?

2006-02-13 Thread DH
Bruno Desthuilliers wrote: >> I am currently seeking for pythonic alternative for XML. > > A pretty obvious one is dicts and lists. What about (Q&D): That's like JSON: http://www.json.org/example.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Jedit

2006-02-13 Thread DH
ziggy wrote: > Just wondering if there is something out there like Jedit, but written > in python ( not just supporting, but actually written in it.. ) > > Nothing large like Stanzi's or Boa.. Just something quick and simple, > with code completion, and a debugger.. No. The only editors with f

Re: hard disk activity

2006-02-13 Thread VSmirk
Of course that was the first thing I tried. But what I meant to say was that at least one port, the python one, didn't have the checksum validation that Paul was talking about, so I was wondering if he knew of one that was faithful to the unix port of it. Thanks much for the links, though, and al

Re: Jedit

2006-02-13 Thread Peter Hansen
ziggy wrote: > Just wondering if there is something out there like Jedit, but written > in python ( not just supporting, but actually written in it.. ) > > Nothing large like Stanzi's or Boa.. Just something quick and simple, > with code completion, and a debugger.. Is that last part a joke? "

Re: FOLLOW-UP how to use RotatingFileHandler

2006-02-13 Thread Peter Hansen
john peter wrote: > the fix was to specify handler.RotatingFileHandler > > does RotatingFileHandler work with Windows XP? Yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4.2 and Berkeley DB 4.4.20 ?

2006-02-13 Thread Claudio Grondi
Damjan wrote: > This is from the Slackware-current changelog: > > d/python-2.4.2-i486-1.tgz: Upgraded to python-2.4.2. >The bsddb module didn't build against the new 4.4.x version of >Berkeley DB. Does anyone care? Or perhaps have a patch? :-) > > Does anyone have a suggestion? >

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Peter Hansen
Roy Smith wrote: > Peter Maas <[EMAIL PROTECTED]> wrote: > >>Latin n-tuple >>--- >>... ... >>triplex triple >>duplexduple >>simplex simple > > > Would a 9-tuple be a nipple? Perhaps, but if you're a dairy farmer,

Jedit

2006-02-13 Thread ziggy
Just wondering if there is something out there like Jedit, but written in python ( not just supporting, but actually written in it.. ) Nothing large like Stanzi's or Boa.. Just something quick and simple, with code completion, and a debugger.. -- http://mail.python.org/mailman/listinfo/python-l

Re: hard disk activity

2006-02-13 Thread CatDude
> So I'm wondering if you know off-hand which windows port does this > checksum validation you outlined. http://www.gaztronics.net/rsync.php is one source. Just do a Google search for "windows rsync". -- http://mail.python.org/mailman/listinfo/python-list

Re: hard disk activity

2006-02-13 Thread Countess Katzenplatzen
> So I'm wondering if you know off-hand which windows port does this > checksum validation you outlined. http://www.gaztronics.net/rsync.php is one source. Just do a Google search for "windows rsync". -- http://mail.python.org/mailman/listinfo/python-list

Re: readlines and break apart based on letters

2006-02-13 Thread rtilley
I got this to work... just FYI: s = 'O:owner_sidG:group_sidD:dacl_flags(string_ace1)(string_ace2)...(string_acen)S:sacl_flags(string_ace1)(string_ace2)...(string_acen)' SD = {} S = str.split(s, 'S:') SD['S_ACL'] = S[1] D = str.split(S[0], 'D:') SD['D_ACL'] = D[1] G = str.split(D[0], 'G:') SD['G

Re: invert the order of a string

2006-02-13 Thread Paul Rubin
rtilley <[EMAIL PROTECTED]> writes: > Well, it turns out to be the best way to invert a string, IMO. The > reversed() feature returns a reversed object... not a reversed > string. In short, I have to fool with it again _after_ it has been > inverted. The slicing takes care of the job right away and

Re: invert the order of a string

2006-02-13 Thread Bruno Desthuilliers
Paul Rubin a écrit : > rtilley <[EMAIL PROTECTED]> writes: > >>s = list('some_random_string') >>print s >>s.reverse() >>print s >>s = ''.join(s) >>print s >> >>Surely there's a better way to do this, right? > > > In Python 2.4, just say > s = reversed('some_random_string') Python 2.4.1 (#1, J

Re: invert the order of a string

2006-02-13 Thread Bruno Desthuilliers
rtilley a écrit : > s = list('some_random_string') > print s > s.reverse() > print s > s = ''.join(s) > print s > > Surely there's a better way to do this, right? print 'some_random_string'[::-1] -- http://mail.python.org/mailman/listinfo/python-list

Re: invert the order of a string

2006-02-13 Thread rtilley
Dave Hansen wrote: > It's just simple slicing. Well, maybe not so simple, or at least not > so common, but with a syntax similar to the range function. Consider > the following (string chosen to make it obvious what's going on): > > s = "0123456789" > s[::] > s[3::] > s[:3:] > s[::3] > s[::-2] >

Re: invert the order of a string

2006-02-13 Thread Dave Hansen
On Mon, 13 Feb 2006 19:03:32 + in comp.lang.python, rtilley <[EMAIL PROTECTED]> wrote: >Dave Hansen wrote: >> How about >> >> s = "some random string" >> print s >> s = s[::-1] >> print s > >That looks like Perl, but it works. Makes me wonder with the string >module doesn't have a reverse o

Re: invert the order of a string

2006-02-13 Thread Paul Rubin
rtilley <[EMAIL PROTECTED]> writes: > s = list('some_random_string') > print s > s.reverse() > print s > s = ''.join(s) > print s > > Surely there's a better way to do this, right? In Python 2.4, just say s = reversed('some_random_string') -- http://mail.python.org/mailman/listinfo/python-list

Re: ANNOUNCE: Mod_python 3.2.7

2006-02-13 Thread Damjan
Just upgraded from 3.1.4 / Apache-2.0.55, and I can confirm that both moin-1.5 and trac-0.9.3 continued to work without problems. -- http://mail.python.org/mailman/listinfo/python-list

Re: invert the order of a string

2006-02-13 Thread rtilley
Dave Hansen wrote: > How about > > s = "some random string" > print s > s = s[::-1] > print s That looks like Perl, but it works. Makes me wonder with the string module doesn't have a reverse or invert function? -- http://mail.python.org/mailman/listinfo/python-list

Re: invert the order of a string

2006-02-13 Thread Dave Hansen
On Mon, 13 Feb 2006 18:51:11 + in comp.lang.python, rtilley <[EMAIL PROTECTED]> wrote: >s = list('some_random_string') >print s >s.reverse() >print s >s = ''.join(s) >print s > >Surely there's a better way to do this, right? How about s = "some random string" print s s = s[::-1] print s HT

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Steve Horsley
Paddy wrote: > Its tupple surely. > > The following shows that we are not the first to ponder this: > > http://www.jot.fm/issues/issue_2003_03/column9 > > Stick tuple into the Windosw XP speech properties preview box and hit > preview-voice, it says tupple not toople. :-) > Which only goes to

Python 2.4.2 and Berkeley DB 4.4.20 ?

2006-02-13 Thread Damjan
This is from the Slackware-current changelog: d/python-2.4.2-i486-1.tgz: Upgraded to python-2.4.2. The bsddb module didn't build against the new 4.4.x version of Berkeley DB. Does anyone care? Or perhaps have a patch? :-) Does anyone have a suggestion? -- http://mail.python.org/ma

invert the order of a string

2006-02-13 Thread rtilley
s = list('some_random_string') print s s.reverse() print s s = ''.join(s) print s Surely there's a better way to do this, right? -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic gui format?

2006-02-13 Thread Bruno Desthuilliers
Gregory Petrosyan a écrit : > Buenos dias, amigos! > I have to write _simple_ gui library, for embedding into game. My > first attempt was to use XML: isn't it cute to describe ui in such a > way: > > > Hello World! > > > (some text here) > > > first elem

Re: Location of Python modules

2006-02-13 Thread Rene Pijlman
Byte: >where are Python modules stored in Linux? Where are eggs laid on the western hemisphere? -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

intro to python courses?

2006-02-13 Thread usenet05
A smart but non-technical friend would like to take an introductory programming course, and it seems pretty obvious to me he should look for something in Python. He'd prefer to take a college-level course for credit. A meatspace class in the Boston, Mass., area or an online extension course would

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Peter Maas
Peter Maas schrieb: > But tuples mean threefold, twofold etc. and the Latin equivalents > are triplex duplex simples. triplex duplex simplex Peter Maas, Aachen -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Peter Maas
Dave Hansen schrieb: >> Latin n-tuple >> --- >> ... ... >> triplex triple >> duplexduple >> simplex simple > > When I was in 4th grade, I was taught to count to ten in latin: unos, > duos, trace, quatro, quinque, sex

RE: how do you pronounce 'tuple'?

2006-02-13 Thread Delaney, Timothy (Tim)
Grant Edwards wrote: >> Well, I hope this doesn't make me lose credibility, but I've >> actually never seen the show! I saw Holy Grail several years >> ago, though. But I'm very curious about this whole cheese shop >> skit, so when I get home tonight I'm going to download it. :) > > IMO, it's not

Re: FTPlib

2006-02-13 Thread Peter A.Schott
Shouldn't that be: srcFtp.retrbinary('get ' + file[2:]) or some similar variation? You're also missing a block telling this where to write the local file. LocalFile = file.open(file[2:], "wb") LocalFile.write(srcFtp.retrbinary('get ' + file[2:]) ) (or something similar) -Pete "Harlin Seritt"

Re: hard disk activity

2006-02-13 Thread Paul Rubin
"VSmirk" <[EMAIL PROTECTED]> writes: > So I'm wondering if you know off-hand which windows port does this > checksum validation you outlined. I think rsync has been ported to Windows but I don't know any details. I don't use Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic gui format?

2006-02-13 Thread Gregory Petrosyan
I need format, specialised for manual editing. (And in this case a) I don't want/need to develop/find GUI forms editors etc; b) maybe python is better for manual work? XML is pretty nice for machines, but what about human mind: what is closer to it?) Anyway, thanks for your help & attention. --

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Dave Hansen
On Mon, 13 Feb 2006 16:46:26 -0500 in comp.lang.python, Steve Holden <[EMAIL PROTECTED]> wrote: >Dave Hansen wrote: >> On Sun, 12 Feb 2006 23:30:25 -0500 in comp.lang.python, Steve Holden >> <[EMAIL PROTECTED]> wrote: [...] >> >>>"Tyoople", "toople" or "tupple" depending on who you are, where you

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Roy Smith
Peter Maas <[EMAIL PROTECTED]> wrote: >Latin n-tuple >--- >... ... >triplex triple >duplexduple >simplex simple Would a 9-tuple be a nipple? -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic gui format?

2006-02-13 Thread Paul Boddie
Gregory Petrosyan wrote: > Thanks for your reply. > But isn't python code more flexible than XML? I think it's not harder > to edit py file than xml file. It's all about integration with tools, and while there are various situations where avoiding tools is often better than extensive use of tools

Re: Pythonic gui format?

2006-02-13 Thread James Stroud
Ivan Voras wrote: > Gregory Petrosyan wrote: >> But after reading "Python Is Not Java" >> http://dirtsimple.org/2004/12/python-is-not-java.html (BTW I'm not a >> Java programmer) I realised that it is actually not cute at all :) (am >> I wrong here?) > > Don't do that :) > > Don't listen to recom

Re: Netstat in python. Does it's possible?

2006-02-13 Thread Jorgen Grahn
On Sun, 12 Feb 2006 22:56:06 +0100, Martin v. Löwis <[EMAIL PROTECTED]> wrote: > Jorgen Grahn wrote: >> I was thinking mostly about /proc, /sys and related file systems. I have a >> feeling parts of them they change quite frequently under Linux, and of >> course under other Unices they may look com

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Dave Hansen <[EMAIL PROTECTED]> wrote: > I've seen "route" pronounced "rout" or "root" depending on the > background and mood of the speaker, though in this part of the country > ("midwest", though "middle" might be more accurate) the former > pronunciation is far

Re: Pulling all n-sized combinations from a list

2006-02-13 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Magnus Lycka wrote: > >>[EMAIL PROTECTED] wrote: >> >>>But it turns out he actually had one, which he graciously provided >>>in response to my observation. If I had kept my trap shut, I wouldn't >>>have it, would I? [...] > And, strange as it may seem, asking questions t

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Dave Hansen
On Mon, 13 Feb 2006 22:30:43 +0100 in comp.lang.python, Peter Maas <[EMAIL PROTECTED]> wrote: >John Salerno schrieb: >> Terry Hancock wrote: >> >>> So what's a 1-element tuple, anyway? A "mople"? "monople"? >>> It does seem like this lopsided pythonic creature (1,) ought >>> to have a name to re

Re: ANN: PyGUI 1.6

2006-02-13 Thread Wolfgang Keller
Hello, On Sun, 12 Feb 2006 07:50:56 +0100, greg wrote (in article <[EMAIL PROTECTED]>): > PyGUI is an experimental highly-Pythonic cross-platform > GUI API. How "experimental" (or useable for productivity applications) would you consider it compared to e.g. wxwidgets? And, btw; I couldn't immed

Re: html source

2006-02-13 Thread Steve Holden
Steve Young wrote: > Hi, I was wondering why when I use urllib2.build_opener().open(url), it > doesn't give me the same thing as if I would just click on view--> > source on my web browser. It gives me most of html on the page but > leaves out lots of scripts and some of the link's urls are trun

Re: hard disk activity

2006-02-13 Thread ironkan
Maybe an example will help file A abef | 1938 | 4bac | 0def | 8675 file B adef | 0083 | abfd | 3356 | 2465 File A is different from file B and you want to have File A look like File B. So do the segmentation (I have chosen ' | ' as the divide between segments). After that do checksums on eac

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Steve Holden
Dave Hansen wrote: > On Sun, 12 Feb 2006 23:30:25 -0500 in comp.lang.python, Steve Holden > <[EMAIL PROTECTED]> wrote: > > >>John Salerno wrote: > > [...] > >>>I know it comes from the suffix -tuple, which makes me think it's >>>pronounced as 'toople', but I've seen (at m-w.com) that the first

Re: how do you pronounce 'tuple'?

2006-02-13 Thread John Salerno
Peter Maas wrote: > I wouldn't mind calling (1,) a simple but I'm not a native English > speaker so I have no idea wether it sounds ridiculous to English > ears. If simple is too simple for you just call it simplum or simplon > or simplex. Heh heh, simple is weird. How about this: one-uple, whic

Re: how do you pronounce 'tuple'?

2006-02-13 Thread John Salerno
Dave Hansen wrote: > I've seen "route" pronounced "rout" or "root" depending on the > background and mood of the speaker I actually came up with a method that I use: "rout" for a verb, "root" for a noun. So Route 66 is Root 66, and routing an army is rOUTing an army. :) -- http://mail.python.

Re: Jython socket typecasting problems

2006-02-13 Thread Steve Holden
Kent Johnson wrote: > Mark Fink wrote: > >>I added the two print lines as recommended: >>self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>print type(self.host), repr(self.host) >>print type(self.port), repr(self.port) >>self.socket.connect((self.hos

Re: cyclic data structures

2006-02-13 Thread John Salerno
Duncan Booth wrote: > The append method modifies the list in place. That's the key that unlocked the mystery for me. ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: cyclic data structures

2006-02-13 Thread John Salerno
Carsten Haese wrote: > L is [1,2] before the append. After the append, L is [1,2,L], which is > [1,2,[1,2,L]], which is [1,2,[1,2,[1,2,L]]] etc into infinity. L > literally contains itself after the append. Ah, this perfectly explains it now! I guess I was dancing around this fact, but now that

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Peter Maas
John Salerno schrieb: > Terry Hancock wrote: > >> So what's a 1-element tuple, anyway? A "mople"? "monople"? >> It does seem like this lopsided pythonic creature (1,) ought >> to have a name to reflect its ugly, newbie-unfriendly >> nature. >> >> Are we having fun yet? ;-) > > I kind of like 'mo

Re: FOLLOW-UP how to use RotatingFileHandler

2006-02-13 Thread john peter
the fix was to specify handler.RotatingFileHandler   does RotatingFileHandler work with Windows XP? john peter <[EMAIL PROTECTED]> wrote:Hi!   I have the following logging.conf : [loggers]keys=root   [handlers]keys=roth   [formatters]keys=simpleFormatter   [logger_root]level=INFOhand

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Jack Diederich
On Mon, Feb 13, 2006 at 08:52:06PM +, John Salerno wrote: > Terry Hancock wrote: > > > So what's a 1-element tuple, anyway? A "mople"? "monople"? > > It does seem like this lopsided pythonic creature (1,) ought > > to have a name to reflect its ugly, newbie-unfriendly > > nature. > > > > Are

Re: hard disk activity

2006-02-13 Thread VSmirk
Thanks for the head's up. I was so giddy with the simplicity of the solution, I stopped trying to poke holes in it. I agree with your philosophy of not "reinventing the wheel", but I did notice two things: First, the link you provided claims in the features section that rsync if for *nix systems

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Dave Hansen
On Sun, 12 Feb 2006 23:30:25 -0500 in comp.lang.python, Steve Holden <[EMAIL PROTECTED]> wrote: >John Salerno wrote: [...] > >> I know it comes from the suffix -tuple, which makes me think it's >> pronounced as 'toople', but I've seen (at m-w.com) that the first >> pronunciation option is 'tuhpl

Re: trapping errors in function call syntax

2006-02-13 Thread Duncan Booth
Fredrik Lundh wrote: > Avi Kak wrote: >> Suppose I write a function that I want to be called >> with ONLY keyword argumnts, how do I raise an >> exception should the function get called with >> what look like position-specfic arguments? > > here's one way to do it: > def func(*args, **kw): >

Re: cyclic data structures

2006-02-13 Thread Duncan Booth
John Salerno wrote: > L.append(L) basically creates this, I think: > > [1, 2, L] Correct. > > Now, assuming that's correct, and since L points to the list [1, 2], wrong. You just said it yourself: L is now the list [1, 2, L] > why > can't '[1, 2]' be substituted for the 'L' and then the list

how to use RotatingFileHandler

2006-02-13 Thread john peter
Hi!   I have the following logging.conf : [loggers]keys=root   [handlers]keys=roth   [formatters]keys=simpleFormatter   [logger_root]level=INFOhandlers=roth   [handler_roth]class=RotatingFileHandlerlevel=INFOformatter=simpleFormatterargs=('adssim.log','w', 200, 4)   [formatter_simpleFo

Re: [OT]Another n00b: Removing the space in "print 'text', var"

2006-02-13 Thread Bruno Desthuilliers
Rick Zantow a écrit : > bruno at modulix <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > >>HappyHippy wrote: >> (snip) >>>eg. >>>strName = 'World' >>>print 'Hello', strName, ', how are you today?' >> >>Already got an anwser, now just a coding-style suggestion: hungarian >>notation is

Re: hard disk activity

2006-02-13 Thread Paul Rubin
"VSmirk" <[EMAIL PROTECTED]> writes: > Aweseme!!! I got as far as segmenting the large file on my own, and I > ran out of ideas. I kind of thought about checksum, but I never put > the two together. > > Thanks. You've helped a lot The checksum method I described works ok if bytes change in

Re: cyclic data structures

2006-02-13 Thread Carsten Haese
On Mon, 2006-02-13 at 16:03, John Salerno wrote: > Peter Decker wrote: > > > 'L' is a pointer to a list. You are now adding that pointer to the > > very list it points to. > > I understand that, but I guess I just don't see how this creates > anything other than a list that refers to [1, 2], and

Re: hard disk activity

2006-02-13 Thread VSmirk
Aweseme!!! I got as far as segmenting the large file on my own, and I ran out of ideas. I kind of thought about checksum, but I never put the two together. Thanks. You've helped a lot V -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >