Re: Issue with MySQLdb wrapper

2007-05-16 Thread jmg3000
On May 15, 7:22 pm, Gerard M <[EMAIL PROTECTED]> wrote: > Hi guys I have a big problem with this wrapper im using Ubuntu 7.04 > and I want to install python-MySQLdb, I used synaptics and it is > installed, but when I try to do>>> import MySQLdb > > and I get this error: > > Traceback (most recent

Re: Trying to choose between python and java

2007-05-16 Thread Michael Bentley
On May 15, 2007, at 8:21 PM, Anthony Irwin wrote: > I saw on the python site a slide from 1999 that said that python was > slower then java but faster to develop with is python still slower > then java? I guess that all depends on the application. Whenever I have a choice between using someth

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Steven D'Aprano schrieb: > But they aren't new risks and problems, that's the point. So far, every > single objection raised ALREADY EXISTS in some form or another. No. The problem "The traceback shows function names having characters that do not display on most systems' screens" for example doe

Re: Iron Python

2007-05-16 Thread Tim Roberts
BartlebyScrivener <[EMAIL PROTECTED]> wrote: >On May 15, 5:22 am, John Machin <[EMAIL PROTECTED]> wrote: >> > > Anybody tried it? >> >> > Me. >> >> Me too. > >Anybody like it? I think it is a fascinating development, but it is aiming in a different direction. To a certain extent, you have to sepa

Re: Python Dijkstra Shortest Path

2007-05-16 Thread Gabriel Genellina
En Wed, 16 May 2007 00:39:20 -0300, Hugo Ferreira <[EMAIL PROTECTED]> escribió: > While trying to optimize this: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/119466 > > ... and still have a fast edge lookup, I've done the following tweaks: I've replaced that strange deeply nested

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Steven D'Aprano schrieb: >> Any program that uses non-English identifiers in Python is bound to >> become gibberish, since it *will* be cluttered with English identifiers >> all over the place anyway, wether you like it or not. > > It won't be gibberish to the people who speak the language. Hmmm,

Re: url question - extracting (2 types of) domains

2007-05-16 Thread Michael Bentley
On May 15, 2007, at 9:04 PM, lazy wrote: > Hi, > Im trying to extract the domain name from an url. lets say I call > it full_domain and significant_domain(which is the homepage domain) > > Eg: url=http://en.wikipedia.org/wiki/IPod , > full_domain=en.wikipedia.org ,significant_domain=wikipedia.org

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Gregor Horvath schrieb: > If comments are allowed to be none English, then why are identifier not? I don't need to be able to type in the exact characters of a comment in order to properly change the code, and if a comment does not display on my screen correctly, I am not as fscked as badly as whe

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
René Fleschenberg schrieb: > today, to the best of my knowledge. And "in some form or another" > basically means that the PEP would create more possibilities for things > to go wrong. That things can already go wrong today does not mean that > it does not matter if we create more occasions were th

setting an attribute

2007-05-16 Thread 7stud
"When you bind (on either a class or an instance) an attribute whose name is not special...you affect only the __dict__ entry for the attribute(in the class or instance, respectively)." In light of that statement, how would one explain the output of this code: class Test(object): x = [1, 2]

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
[EMAIL PROTECTED] schrieb: > I'm not sure how you conclude that no problem exists. > - Meaningful identifiers are critical in creating good code. I agree. > - Non-english speakers can not create or understand > english identifiers hence can't create good code nor > easily grok existing code.

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Raffaele Salmaso
After reading all thread, and based on my experience (I'm italian, english is not my native language) Martin v. Löwis wrote: > - should non-ASCII identifiers be supported? yes > - why? Years ago I've read C code written by a turkish guy, and all identifiers were transliteration of arab (persian

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Gregor Horvath schrieb: > René Fleschenberg schrieb: > >> today, to the best of my knowledge. And "in some form or another" >> basically means that the PEP would create more possibilities for things >> to go wrong. That things can already go wrong today does not mean that >> it does not matter if

Re: Sorting troubles

2007-05-16 Thread Aether . Singularity
On May 15, 11:54 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 14 May 2007 21:45:26 -0700, seyensubs wrote: > > Ah, I see, just slicing it like that.. nice! But after doing some timing > > tests, the version that's in place and using partitions is about twice > > faster than the non hybr

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Eric Brunel
On Tue, 15 May 2007 17:35:11 +0200, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Eric Brunel wrote: >> On Tue, 15 May 2007 15:57:32 +0200, Stefan Behnel >>> In-house developers are rather for this PEP as they see the advantage >>> of >>> expressing concepts in the way the "non-techies" talk about

Re: tkFileDialog.askopenfilename()

2007-05-16 Thread martin . laloux
look at "Basic Tkinter dialogs" from python cookbook at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
René Fleschenberg wrote: > [EMAIL PROTECTED] schrieb: >> I'm not sure how you conclude that no problem exists. >> - Meaningful identifiers are critical in creating good code. > > I agree. > >> - Non-english speakers can not create or understand >> english identifiers hence can't create good cod

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Stefan Behnel wrote: > René Fleschenberg wrote: >> We all know what the PEP is about (we can read). The point is: If we do >> not *need* non-English/ASCII identifiers, we do not need the PEP. If the >> PEP does not solve an actual *problem* and still introduces some >> pote

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
René Fleschenberg wrote: > Gregor Horvath schrieb: >> If comments are allowed to be none English, then why are identifier not? > > I don't need to be able to type in the exact characters of a comment in > order to properly change the code, and if a comment does not display on > my screen correctly

~!~ Britneys New BOOB job fails Silcone Valley everywhere!!!!

2007-05-16 Thread deepbroke7
http://scargo.in/2007/05/attorney-lawyers-say-whats-in-your.html - Britneys Boob job spurs lawsuit.!! -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread gatti
Martin v. Lowis wrote: > Lorenzo Gatti wrote: >> Not providing an explicit listing of allowed characters is inexcusable >> sloppiness. > That is a deliberate part of the specification. It is intentional that > it does *not* specify a precise list, but instead defers that list > to the version of t

A new project.

2007-05-16 Thread colin . barnette
I am interested in organizing and taking part in a project that would create a virtual world much like the one described in Neal Stephenson's 'Snow Crash'. I'm not necessarily talking about something 3d and I'm not talking about a game either. Like a MOO, only virtual. And each 'user' is allocat

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Christophe
[EMAIL PROTECTED] a écrit : > Steven D'Aprano wrote: >> I would find it useful to be able to use non-ASCII characters for heavily >> mathematical programs. There would be a closer correspondence between the >> code and the mathematical equations if one could write D(u*p) instead of >> delta(mu*pi).

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Eric Brunel
On Tue, 15 May 2007 21:07:30 +0200, Pierre Hanser <[EMAIL PROTECTED]> wrote: > hello > > i work for a large phone maker, and for a long time > we thought, very arrogantly, our phones would be ok > for the whole world. > > After all, using a phone uses so little words, and > some of them where eve

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Stefan Behnel schrieb: > Then get tools that match your working environment. Integration with existing tools *is* something that a PEP should consider. This one does not do that sufficiently, IMO. -- René -- http://mail.python.org/mailman/listinfo/python-list

Re: setting an attribute

2007-05-16 Thread Bruno Desthuilliers
7stud a écrit : > "When you bind (on either a class or an instance) an attribute whose > name is not special...you affect only the __dict__ entry for the > attribute(in the class or instance, respectively)." > > In light of that statement, how would one explain the output of this > code: > > clas

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I even sometimes > read code snippets on email lists and websites from my handheld, which > is sadly still memory-limited enough that I'm really unlikely to > install anything approaching a full set of Unicode fonts. One of the arguments against this PEP was that it seem

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Stefan Behnel schrieb: >>> - Non-english speakers can not create or understand >>> english identifiers hence can't create good code nor >>> easily grok existing code. >> I agree that this is a problem, but please understand that is problem is >> _not_ solved by allowing non-ASCII identifiers! >

Re: Get a control over a window

2007-05-16 Thread Duncan Booth
Tom Gur <[EMAIL PROTECTED]> wrote: > I was wondering how do I get control over a window (Win32). > to be more specific, I need to find a handle to a window of a certain > program and minimize the window. > Here's a function which returns a list of all windows where the class is 'PuTTY' or the t

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Marc 'BlackJack' Rintsch schrieb: > There are potential users of Python who don't know much english or no > english at all. This includes kids, old people, people from countries > that have "letters" that are not that easy to transliterate like european > languages, people who just want to learn P

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
Eric Brunel wrote: > reason why non-ASCII identifiers should be supported. I just wish I'll > get a '--ascii-only' switch on my Python interpreter (or any other means > to forbid non-ASCII identifiers and/or strings and/or comments). I could certainly live with that as it would be the right way ar

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Stefan Behnel schrieb: > *Your* logic can be used to justify dropping *any* feature. No. I am considering both the benefits and the problems. You just happen to not like the outcome of my considerations [again, please don't reply by E-Mail, I read the NG]. -- René -- http://mail.python.org/mail

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Eric Brunel
On Wed, 16 May 2007 02:14:58 +0200, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 15 May 2007 09:09:30 +0200, Eric Brunel wrote: > >> Joke aside, this just means that I won't ever be able to program math in >> ADA, because I have absolutely no idea on how to do a 'pi' character on >> my k

Re: Distributing programs depending on third party modules.

2007-05-16 Thread Bruno Desthuilliers
Kevin Walzer a écrit : > Bruno Desthuilliers wrote: > >>> What platform are you doing this on? On the Linux platform, >>> "dependency hell" of this sort is pretty much unavoidable, >> >> Yes it is. EasyInstall works just fine. > > You can install a beast like PyQt with easy_install? Meaning, tha

Re: setting an attribute

2007-05-16 Thread half . italian
On May 16, 12:34 am, 7stud <[EMAIL PROTECTED]> wrote: > "When you bind (on either a class or an instance) an attribute whose > name is not special...you affect only the __dict__ entry for the > attribute(in the class or instance, respectively)." > > In light of that statement, how would one explain

iteration doesn't seem to work ??

2007-05-16 Thread stef
hello, can someone tell me why the following iteration doesn't work, and how I should replace empty strings in a list with a default value. >>> v ['123', '345', '', '0.3'] >>> for items in v: ... if items=='': ... items='3' ... >>> >>> v ['123', '345', '', '0.3'] >>> thanks,

Re: Trying to choose between python and java

2007-05-16 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On May 15, 5:16 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: >> Beliavsky a écrit : >> >> >> >>> On May 15, 1:30 am, Anthony Irwin <[EMAIL PROTECTED]> wrote: >>> #5 someone said that they used to use python but stopped because the language changed or

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
René Fleschenberg wrote: > Stefan Behnel schrieb: - Non-english speakers can not create or understand english identifiers hence can't create good code nor easily grok existing code. >>> I agree that this is a problem, but please understand that is problem is >>> _not_ solved by a

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
René Fleschenberg wrote: > Marc 'BlackJack' Rintsch schrieb: >> There are potential users of Python who don't know much english or no >> english at all. This includes kids, old people, people from countries >> that have "letters" that are not that easy to transliterate like european >> languages,

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
René Fleschenberg schrieb: > Gregor Horvath schrieb: >> René Fleschenberg schrieb: >> >>> today, to the best of my knowledge. And "in some form or another" >>> basically means that the PEP would create more possibilities for things >>> to go wrong. That things can already go wrong today does not me

Re: Distributing programs depending on third party modules.

2007-05-16 Thread David Boddie
On May 16, 7:44 am, Tina I <[EMAIL PROTECTED]> wrote: > A binary would be ideal. I'll look into the freeze modules and > Pyinstaller. Even if they don't handle huge things like Qt it would be a > step in the right direction if it handles smaller third part modules. > And maybe the smartest thing t

Re: iteration doesn't seem to work ??

2007-05-16 Thread half . italian
On May 16, 1:41 am, stef <[EMAIL PROTECTED]> wrote: > hello, > > can someone tell me why the following iteration doesn't work, > and > how I should replace empty strings in a list with a default value. > > >>> v > ['123', '345', '', '0.3'] > >>> for items in v: > ... if items=='': > ...

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Ben
On May 15, 11:25 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > René Fleschenberg wrote: > > Javier Bezos schrieb: > >>> But having, for example, things like open() from the stdlib in your code > >>> and then öffnen() as a name for functions/methods written by yourself is > >>> just plain silly. It

Re: iteration doesn't seem to work ??

2007-05-16 Thread stef
hello Sean, thanks very much for the explanation and solution. cheers, Stef Mientki [EMAIL PROTECTED] wrote: > On May 16, 1:41 am, stef <[EMAIL PROTECTED]> wrote: > >> hello, >> >> can someone tell me why the following iteration doesn't work, >> and >> how I should replace empty strings in a

Re: url question - extracting (2 types of) domains

2007-05-16 Thread lazy
Thanks. Hmm, the url list is quite huge(40M). I think it will take a lot of time,for a whois lookup I guess. But yeah, thats seems to be a good way. Probably I will try it with a smaller set (10K) and see the time it takes. If not, I guess I will just build a table of known domains(.com,.org,.co.il

Re: Quote aware split

2007-05-16 Thread Diez B. Roggisch
Ondrej Baudys wrote: > Hi, > > After trawling through the archives for a simple quote aware split > implementation (ie string.split-alike that only splits outside of > matching quote) and coming up short, I implemented a quick and dirty > function that suits my purposes. Maybe using the csv m

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
René Fleschenberg schrieb: >> I love Python because it does not dictate how to do things. >> I do not need a ASCII-Dictator, I can judge myself when to use this >> feature and when to avoid it, like any other feature. > > *That* logic can be used to justify the introduction of *any* feature. >

Re: Interesting list Validity (True/False)

2007-05-16 Thread Gabriel Genellina
En Wed, 16 May 2007 03:16:59 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On May 15, 7:07 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> import gmpy >> a = 2**177149-1 >> b = gmpy.mpz(2**177149-1) >> a==b >> > True >> print '%d' % (b) >> >> > Traceb

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread [EMAIL PROTECTED]
Ben wrote: > On May 15, 11:25 pm, Stefan Behnel <[EMAIL PROTECTED]> > wrote: > > Rene Fleschenberg wrote: > > > Javier Bezos schrieb: > > >>> But having, for example, things like open() from the stdlib in your code > > >>> and then o:ffnen() as a name for functions/methods written by yourself > >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread [EMAIL PROTECTED]
Christophe wrote: > [EMAIL PROTECTED] a ecrit : > > Steven D'Aprano wrote: > >> I would find it useful to be able to use non-ASCII characters for heavily > >> mathematical programs. There would be a closer correspondence between the > >> code and the mathematical equations if one could write D(u*p)

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread [EMAIL PROTECTED]
Stefan Behnel wrote: > [EMAIL PROTECTED] wrote: > > I even sometimes > > read code snippets on email lists and websites from my handheld, which > > is sadly still memory-limited enough that I'm really unlikely to > > install anything approaching a full set of Unicode fonts. > > One of the arguments

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Steven D'Aprano schrieb: >> Unless you are 150% sure that there will *never* be the need for a >> person who does not know your language of choice to be able to read or >> modify your code, the language that "fits the environment best" is >> English. > > Just a touch of hyperbole perhaps? > > You

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Neil Hodgson
Lorenzo Gatti: > Ok, maybe you considered listing characters but you earnestly decided > to follow an authority; but this reliance on the Unicode standard is > not a merit: it defers to an external entity (UAX 31 and the Unicode > database) a foundation of Python syntax. PEP 3131 uses a simil

Re: tkinter button state = DISABLED

2007-05-16 Thread Hendrik van Rooyen
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >Maybe there is a confusion here. You code above means that, when the event >"The leftmost MOUSE BUTTON was released" happens over your BUTTON WIDGET >b, your function will be called. I have never seen this working in Tkinter, unless the button was

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
"Michael Yanowitz" <[EMAIL PROTECTED]> wrote; > Let me guess - the next step will be to restrict the identifiers > to be at most 6 characters long. No that is way too restrictive - you need at least eight, but they must be from the first 80 in the ASCII set - i.e. - capitals only Caps lock o

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
"Méta-MCI" <[EMAIL PROTECTED]> wrote: > Hi! > > - should non-ASCII identifiers be supported? why? > - would you use them if it was possible to do so? in what cases? > > Yes. > > JScript can use letters with accents in identifiers > XML (1.1) can use letters with accents in tags > C# can use le

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
"Eric Brunel" <[EMAIL PROTECTED]> wrote: >So what? Does it mean that it's acceptable for the standard library and >keywords to be in English only, but the very same restriction on >user-defined identifiers is out of the question? Why? If I can use my own >language in my identifiers, why can't I wr

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
"Stefan Behnel" <[EMAIL PROTECTED]> wrote: .:) This is not about "technical" English, this is about domain specific >English. How big is your knowledge about, say, biological terms or banking >terms in English? Would you say you're capable of modelling an application >from the domain of biology, w

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > > "Hendrik van Rooyen" <[EMAIL PROTECTED],,,.co.za> wrote in message > news:[EMAIL PROTECTED] > > > <[EMAIL PROTECTED]> wrote: > > [I fixed the broken attribution in your quote] > Sorry about that - I deliberately fudge email addys... > First "while" is a keywo

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
"HYRY" <[EMAIL PROTECTED]> wrote: > If non-ASCII identifiers becomes true, I think it will be the best > gift for Children who donot know English. How do you feel about the mix of English keywords and Chinese? How does the English - like "sentences " look to a Chinese? Would you support the ext

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Christophe
[EMAIL PROTECTED] a écrit : > Christophe wrote: >> [EMAIL PROTECTED] a ecrit : >>> Steven D'Aprano wrote: I would find it useful to be able to use non-ASCII characters for heavily mathematical programs. There would be a closer correspondence between the code and the mathematical equa

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
Hendrik van Rooyen wrote: > "Beautiful is better than ugly" Good point. Today's transliteration of German words into ASCII identifiers definitely looks ugly. Time for this PEP to be accepted. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > code on the (GUI-less) production servers over a terminal link. They > have to use all kinds of environments where they can't install the > latest and greatest fonts. Promoting code that becomes very hard to > read and debug in real situations seems like a sound nega

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Gregor Horvath schrieb: >> *That* logic can be used to justify the introduction of *any* feature. >> > > No. That logic can only be used to justify the introduction of a feature > that brings freedom. That is any feature that you are not forced to use. So let's get gotos and the like. Every progr

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > Stefan Behnel wrote: >> [EMAIL PROTECTED] wrote: >>> I even sometimes >>> read code snippets on email lists and websites from my handheld, which >>> is sadly still memory-limited enough that I'm really unlikely to >>> install anything approaching a full set of Unicode fon

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
Hendrik van Rooyen schrieb: > It is not so much for technical reasons as for aesthetic > ones - I find reading a mix of languages horrible, and I am > kind of surprised by the strength of my own reaction. This is a matter of taste. In some programs I use German identifiers (not unicode). I and o

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread HYRY
> How do you feel about the mix of English keywords and Chinese? > How does the English - like "sentences " look to a Chinese? > > Would you support the extension of this PEP to include Chinese > Keywords? > > Would that be a lesser or greater gift? > Because the students can remember some English

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Neil Hodgson
Eric Brunel: > ... there is no > keyboard *on Earth* allowing to type *all* characters in the whole > Unicode set. My keyboard in conjunction with the operating system (US English keyboard on a Windows XP system) allows me to type characters from any language. I haven't learned how to ty

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
"Stefan Behnel" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Beautiful is better than ugly" > > Good point. Today's transliteration of German words into ASCII identifiers > definitely looks ugly. Time for this PEP to be accepted. > Nice out of context quote. :-) Now look me in

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Stefan Behnel schrieb: >> Now, very special environments (what I called "rare and isolated" >> earlier) like special learning environments for children are a different >> matter. It should be ok if you have to use a specially patched Python >> branch there, or have to use an interpreter option that

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Christophe schrieb: > Who displays stack frames? Your code. Wrong. > Whose code includes unicode > identifiers? Your code. Wrong. > Whose fault is it to create a stack trace > display procedure that cannot handle unicode? You. Wrong. If you never have to deal with other people's code, cong

Splitting a quoted string.

2007-05-16 Thread mosscliffe
I am looking for a simple split function to create a list of entries from a string which contains quoted elements. Like in 'google' search. eg string = 'bob john "johnny cash" 234 june' and I want to have a list of ['bob', 'john, 'johnny cash', '234', 'june'] I wondered about using the csv rou

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Christophe
René Fleschenberg a écrit : > Christophe schrieb: >> You should know that displaying and editing UTF-8 text as if it was >> latin-1 works very very well.s > > No, this only works for those characters that are in the ASCII range. > For all the other characters it does not work well at all. This al

Re: Quote aware split

2007-05-16 Thread BJörn Lindqvist
How is the code different from shlex.split? -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
Christophe schrieb: > René Fleschenberg a écrit : >> Christophe schrieb: >>> You should know that displaying and editing UTF-8 text as if it was >>> latin-1 works very very well.s >> >> No, this only works for those characters that are in the ASCII range. >> For all the other characters it does not

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Stefan Behnel
René Fleschenberg wrote: > Stefan Behnel schrieb: >>> Now, very special environments (what I called "rare and isolated" >>> earlier) like special learning environments for children are a different >>> matter. It should be ok if you have to use a specially patched Python >>> branch there, or have to

Re: iteration doesn't seem to work ??

2007-05-16 Thread Ant
On May 16, 9:41 am, stef <[EMAIL PROTECTED]> wrote: > hello, > > can someone tell me why the following iteration doesn't work, > and > how I should replace empty strings in a list with a default value. See the other reponse for the why. Here's another how, using list comprehension.: 1 > v = ['123

Re: Distributing programs depending on third party modules.

2007-05-16 Thread Tina I
David Boddie wrote: > On May 16, 7:44 am, Tina I <[EMAIL PROTECTED]> wrote: > >> A binary would be ideal. I'll look into the freeze modules and >> Pyinstaller. Even if they don't handle huge things like Qt it would be a >> step in the right direction if it handles smaller third part modules. >> An

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread André
"Years ago", i wrote RUR-PLE (a python learning environment based on Karel the Robot). Someone mentioned using RUR-PLE to teach programming in Chinese to kids. Here's a little text extracted from the English lessons (and an even smaller one from the Turkish one). I believe that this is relevant

Re: Splitting a quoted string.

2007-05-16 Thread Paul Melis
Paul Melis wrote: > Hi, > > mosscliffe wrote: > >> I am looking for a simple split function to create a list of entries >> from a string which contains quoted elements. Like in 'google' >> search. >> >> eg string = 'bob john "johnny cash" 234 june' >> >> and I want to have a list of ['bob', 'jo

Re: Splitting a quoted string.

2007-05-16 Thread Paul Melis
Hi, mosscliffe wrote: > I am looking for a simple split function to create a list of entries > from a string which contains quoted elements. Like in 'google' > search. > > eg string = 'bob john "johnny cash" 234 june' > > and I want to have a list of ['bob', 'john, 'johnny cash', '234', > 'jun

Re: Automatic login to website (newbie)

2007-05-16 Thread phishboh
On 15 Mai, 16:25, "Tim Williams" <[EMAIL PROTECTED]> wrote: > The frame URL ishttp://www.expekt.com/contenttop.jsp, you could try > navigating directly to the frame to see if it helps > > website = "http://www.expekt.com/contenttop.jsp"; > ie.navigate(website) > ie.textBoxSet('user', 'MyLogin') >

Re: Splitting a quoted string.

2007-05-16 Thread Duncan Booth
mosscliffe <[EMAIL PROTECTED]> wrote: > I am looking for a simple split function to create a list of entries > from a string which contains quoted elements. Like in 'google' > search. > > eg string = 'bob john "johnny cash" 234 june' > > and I want to have a list of ['bob', 'john, 'johnny cash

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Eric Brunel
On Wed, 16 May 2007 12:22:01 +0200, Neil Hodgson <[EMAIL PROTECTED]> wrote: > Eric Brunel: > >> ... there is no keyboard *on Earth* allowing to type *all* characters >> in the whole Unicode set. > > My keyboard in conjunction with the operating system (US English > keyboard on a Windows

Re: Quote aware split

2007-05-16 Thread John Machin
On May 16, 10:50 am, "Ondrej Baudys" <[EMAIL PROTECTED]> wrote: > # last slice will be of the form chars[last:] which we couldnt do above Who are "we"? Here's another version with the "couldn't do" problem fixed and a few minor enhancements: def qsplit2(chars, sep=",", quote="'"): """ Qu

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Carsten Haese
On Wed, 16 May 2007 09:12:40 +0200, René Fleschenberg wrote > The X people who speak "no English" and program in Python. I > think X actually is very low (close to zero), because programming in > Python virtually does require you to know some English, wether you > can use non-ASCII characters in

RE: tkFileDialog.askopenfilename()

2007-05-16 Thread Hamilton, William
> From: [EMAIL PROTECTED] > > Hi, > When I call tkFileDialog.askopenfilename() , the dialog box opens with > the current directory as the default directory. Is it possible to open > the dialog box with a directory other than the current directory. Can > we pass in a user defined starting director

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Ross Ridge
Ross Ridge schrieb: > non-ASCII identifiers. While it's easy to find code where comments use > non-ASCII characters, I was never able to find a non-made up example > that used them in identifiers. Gregor Horvath <[EMAIL PROTECTED]> wrote: >If comments are allowed to be none English, then why are

Garbage Collector in Zope 2.8

2007-05-16 Thread [EMAIL PROTECTED]
Hi. Can anyone tell me how to run garbage collector in zope manually in zope runtime? -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread René Fleschenberg
You have misread my statements. Carsten Haese schrieb: > There is evidence against your assertions that knowing some English is a > prerequisite for programming I think it is a prerequesite for "real" programming. Yes, I can imagine that if you use Python as a teaching tool for Chinese 12 year-o

Re: Splitting a quoted string.

2007-05-16 Thread mosscliffe
Thank you very much for all for your replies. I am now much wiser to using regex and CSV. As I am quite a newbie, I have had my 'class' education improved as well. Many thanks again Richard On May 16, 12:48 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > mosscliffe <[EMAIL PROTECTED]> wrote: > >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread George Sakkis
On May 13, 11:44 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > (snipped) > > So, please provide feedback, e.g. perhaps by answering these > questions: > - should non-ASCII identifiers be supported? why? Initially I was on -1 but from this thread it seems that many closed (or semi-closed) env

Execute commands from file

2007-05-16 Thread tmp123
Hello, Thanks for your time. We have very big files with python commands (more or less, 50 commands each file). It is possible to execute them command by command, like if the commands was typed one after the other in a interactive session? ( Better using command flags than with an small scr

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Jochen Schulz
* René Fleschenberg: > Stefan Behnel schrieb: >> >> [...] They are just tools. Even if you do not >> understand English, they will not get in your way. You just learn them. > > I claim that this is *completely unrealistic*. When learning Python, you > *do* learn the actual meanings of English te

Re: Splitting a quoted string.

2007-05-16 Thread Gerard Flanagan
On May 16, 12:42 pm, mosscliffe <[EMAIL PROTECTED]> wrote: > I am looking for a simple split function to create a list of entries > from a string which contains quoted elements. Like in 'google' > search. > > eg string = 'bob john "johnny cash" 234 june' > > and I want to have a list of ['bob', '

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Sion Arrowsmith
Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Tue, 15 May 2007 09:09:30 +0200, Eric Brunel wrote: >> Joke aside, this just means that I won't ever be able to program math in >> ADA, because I have absolutely no idea on how to do a 'pi' character on >> my keyboard. >Maybe you should find out then?

Re: removing common elemets in a list

2007-05-16 Thread Carsten Haese
On Tue, 2007-05-15 at 23:17 -0700, [EMAIL PROTECTED] wrote: > Hi, > Suppose i have a list v which collects some numbers,how do i > remove the common elements from it ,without using the set() opeartor. > Thanks If the list is sorted, you ca

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Javier Bezos
"Eric Brunel" <[EMAIL PROTECTED]> escribió en el mensaje > Funny you talk about Japanese, a language I'm a bit familiar with and for > which I actually know some input methods. The thing is, these only work if > you know the transcription to the latin alphabet of the word you want to > type, which

Re: Execute commands from file

2007-05-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, tmp123 wrote: > We have very big files with python commands (more or less, 50 > commands each file). > > It is possible to execute them command by command, like if the > commands was typed one after the other in a interactive session? Take a look at the `code` module

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Sion Arrowsmith
Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: >I still don't like the thought of the horrible mix of "foreign" >identifiers and English keywords, coupled with the English >sentence construction. How do you think you'd feel if Python had less in the way of (conventionally used) English keywords/bu

  1   2   3   >