Off Topic: Is the use of supererogatory supererogatory?

2007-05-13 Thread Paddy
On May 13, 12:13 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > As somebody else alredy pointed out, the lambda is supererogatory (to > say the least). What a wonderful new word! I did not know what supererogatory meant, and hoped it had nothing to do with Eros :-) Answers.com gave me a meaning s

Re: Change serial timeout per read

2007-05-13 Thread James T. Dennis
[EMAIL PROTECTED] wrote: > I'm writing a driver in Python for an old fashioned piece of serial > equipment. Currently I'm using the USPP serial module. From what I can > see all the serial modules seem to set the timeout when you open a > serial port. This is not what I want to do. I need to change

Re: Dynamic subclassing ?

2007-05-13 Thread manatlan
On 13 mai, 01:24, [EMAIL PROTECTED] (Alex Martelli) wrote: > manatlan <[EMAIL PROTECTED]> wrote: > > I've got an instance of a class, ex : > > > b=gtk.Button() > > > I'd like to add methods and attributes to my instance "b". > > I know it's possible by hacking "b" with setattr() methods. But i'd >

Re: Dynamic subclassing ?

2007-05-13 Thread manatlan
On 12 mai, 18:57, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > manatlan wrote: > > I can't find the trick, but i'm pretty sure it's possible in an easy > > way. > > It's somewhat easy, boot looks ugly to me. Maybe someone has a more > elegant solution: > > In [6]: import new > > In [13]: class Butto

Re: Popen and wget, problems

2007-05-13 Thread Jesse
Thx Rob! Your solution works perfect! "Rob Wolfe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Jesse" <[EMAIL PROTECTED]> writes: > >> Hi all, I have a problem using wget and Popen. I hope someone can help. >> >> >> -- Problem -- >> I want to use the command: >> wget -nv -O "d

Re: Dynamic subclassing ?

2007-05-13 Thread manatlan
On 12 mai, 20:47, Steven Bethard <[EMAIL PROTECTED]> wrote: > manatlan wrote: > > I've got an instance of a class, ex : > > > b=gtk.Button() > > > I'd like to add methods and attributes to my instance "b". > > I know it's possible by hacking "b" with setattr() methods. But i'd > > like to do it wit

Re: Dynamic subclassing ?

2007-05-13 Thread manatlan
On 13 mai, 10:04, manatlan <[EMAIL PROTECTED]> wrote: > On 12 mai, 18:57, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > > > > > manatlan wrote: > > > I can't find the trick, but i'm pretty sure it's possible in an easy > > > way. > > > It's somewhat easy, boot looks ugly to me. Maybe someone has a mo

Re: Setting thread priorities

2007-05-13 Thread Gerald Kaszuba
Hi John On May 13, 4:46 pm, John Nagle <[EMAIL PROTECTED]> wrote: >There's no way to set thread priorities within Python, is there? Not exactly. You can however use the ctypes module to access the o/s methods of pthread_setschedparam() for UNIX and SetThreadPriority() for Windows. I'm not su

Real globals inside a module

2007-05-13 Thread Jorgen Bodde
Hi All, I am wrestling with some architecture inside my app. Let's say I have a tunings collection, which contains e.g. 23 types of guitar tunings. In my song object I want to restore a relation between one of the tuning objects inside the tunings module. I already figured out I need somethign li

Re: Popen and wget, problems

2007-05-13 Thread js
Hi Jesse. > cmd_set = ['wget', '-nv', '-O dir/cpan.txt', 'http://search.span.org'] [snip] >proc = Popen(cmd_set, stdout=PIPE, stderr=PIPE) wget will treat this as $ wget -nv '-O dir/cpan.txt' "http://search.cpan.org"; And will emit the following error because there's no pathname ' dir/cpan.txt'.

Re: __dict__ for instances?

2007-05-13 Thread Ivan Voras
[EMAIL PROTECTED] wrote: > I think you want "dir(instance)" __dict__ returns the instance Part of the problem is that dir(instance) returns a list of strings, so iterating the dir(instance) gets me strings, not methods. Alternatively, is there a way to get a "bound" instance by its name - some i

Re: Real globals inside a module

2007-05-13 Thread Christoph Haas
On Sun, May 13, 2007 at 11:41:12AM +0200, Jorgen Bodde wrote: > I am wrestling with some architecture inside my app. Let's say I have > a tunings collection, which contains e.g. 23 types of guitar tunings. > In my song object I want to restore a relation between one of the > tuning objects inside t

Re: Real globals inside a module

2007-05-13 Thread Jorgen Bodde
great! Thanks it makes perfect sense, but before attempting some code rewrite I just wanted to be sure ;-) Regards, - Jorgen On 5/13/07, Christoph Haas <[EMAIL PROTECTED]> wrote: > On Sun, May 13, 2007 at 11:41:12AM +0200, Jorgen Bodde wrote: > > I am wrestling with some architecture inside my ap

Re: __dict__ for instances?

2007-05-13 Thread Bruno Desthuilliers
Ivan Voras a écrit : > [EMAIL PROTECTED] wrote: > > >>I think you want "dir(instance)" __dict__ returns the instance > > > Part of the problem is that dir(instance) returns a list of strings, so > iterating the dir(instance) gets me strings, not methods. Alternatively, > is there a way to get

Re: __dict__ for instances?

2007-05-13 Thread Bruno Desthuilliers
Ivan Voras a écrit : > While using PyGTK, I want to try and define signal handlers > automagically, without explicitly writing the long dictionary (i.e. I > want to use signal_autoconnect()). > > To do this, I need something that will inspect the current "self" and > return a dictionary that looks

Re: Dynamic subclassing ?

2007-05-13 Thread Bruno Desthuilliers
manatlan a écrit : > On 12 mai, 17:00, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > >>manatlan a écrit : >> >> >>>I've got an instance of a class, ex : >> >>>b=gtk.Button() >> >>>I'd like to add methods and attributes to my instance "b". >>>I know it's possible by hacking "b" with setattr()

Re: Interesting list Validity (True/False)

2007-05-13 Thread Steven D'Aprano
On Sat, 12 May 2007 21:50:12 -0700, [EMAIL PROTECTED] wrote: >> > Actually, it's this statement that's non-sensical. >> >> > >> > "if arg==True" tests whether the object known as arg is equal to the >> > object known as True. >> > >> >> Not at all, it makes perfect sense. X == Y always tests whe

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-05-13 Thread Jim
On Apr 29, 4:19 pm, Mitchell Jones <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > War Office <[EMAIL PROTECTED]> wrote: > > > On 28 abr, 14:15, Eric Gisse <[EMAIL PROTECTED]> wrote: > > > On Apr 24, 6:13 pm, [EMAIL PROTECTED] wrote: > > [snip] > > > > I love how folks like you ask

Re: design question

2007-05-13 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On May 12, 9:34 pm, Bjoern Schliessmann [EMAIL PROTECTED]> wrote: > > >>In principle, this is legal. >> >>But OTOH, how could a ShoppingCart "buy" something? In my world, >>Buyers "buy" when using ShoppingCarts. > > > Yes, I don't know either. I got this assignme

Re: Interesting list Validity (True/False)

2007-05-13 Thread Carsten Haese
On Sat, 2007-05-12 at 18:43 -0700, [EMAIL PROTECTED] wrote: > > That doesn't explain what you mean. How does "if arg==True" test whether > > "a list is a boolean"? > > >>> type(sys.argv) > > >>> type(True) > All right, so what you meant was "Assuming that arg is a list, 'if arg==True' will alwa

Re: Setting thread priorities

2007-05-13 Thread Grant Edwards
On 2007-05-13, Gerald Kaszuba <[EMAIL PROTECTED]> wrote: > Hi John > > On May 13, 4:46 pm, John Nagle <[EMAIL PROTECTED]> wrote: >>There's no way to set thread priorities within Python, is there? > > Not exactly. You can however use the ctypes module to access the o/s > methods of pthread_setsc

Re: __dict__ for instances?

2007-05-13 Thread Marc Christiansen
Ivan Voras <[EMAIL PROTECTED]> scribis: > While using PyGTK, I want to try and define signal handlers > automagically, without explicitly writing the long dictionary (i.e. I > want to use signal_autoconnect()). > > To do this, I need something that will inspect the current "self" and > return a di

Re: need help with python

2007-05-13 Thread adamurbas
On May 12, 11:55 am, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > I'm not sure how you installed Python, or how you are using it, but I > made something last year to help Windows XP users who are brand new to > Python and can't get things to run, etc. > > You might try either jumping into somewhe

PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Martin v. Löwis
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or to [EMAIL PROTECTED] In summary, this PEP proposes to allow non-ASCII letters as identifiers in Pyth

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread dustin
On Sun, May 13, 2007 at 05:44:39PM +0200, "Martin v. L??wis" wrote: > - should non-ASCII identifiers be supported? why? The only objection that comes to mind is that adding such support may make some distinct identifiers visually indistinguishable. IIRC the DNS system has had this problem, leadin

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Martin v. Löwis
> The only objection that comes to mind is that adding such support may > make some distinct identifiers visually indistinguishable. IIRC the DNS > system has had this problem, leading to much phishing abuse. This is a commonly-raised objection, but I don't understand why people see it as a probl

Re: How to installo????

2007-05-13 Thread RonV
On 10 May 2007 13:54:04 -0700, [EMAIL PROTECTED] wrote: >I would recommend using the command line. Open that up and then type >something like this: > >python pathToWinExt\setup.py > >That should run it and when it's done, your command window should stay >open. Hopefully it will tell you what happ

Re: OMG BRITNEYS AT IT AGAIN AGAIN!!!!!! You stupid fucks! Can't you figger out why we white boys ain't fucking these white trash bitches?

2007-05-13 Thread MMM
On 11 May 2007 14:57:21 -0700, [EMAIL PROTECTED] wrote: >http://britneyboobs.blogspot.com/2007/05/britney-spears-slips-up-again-exposes.html >- Exclusive pics of Britney Spears.. Stoopid dog fuckers!We crackers went to school with these bitches for at least 6 grades and decided they are so ign

elementtree and entities

2007-05-13 Thread Daniel Nogradi
Hi list, How does one prevent elementtree converting & to & (and similarly for other entities)? >>> from xml.etree import ElementTree as et >>> x = et.Element( 'test' ) >>> x.text = '&' >>> et.tostring( x ) '&' Sometimes I would like to have the output '&' Daniel -- http://mail.python.org/mail

Re: Interesting list Validity (True/False)

2007-05-13 Thread [EMAIL PROTECTED]
On May 13, 8:57?am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Sat, 2007-05-12 at 18:43 -0700, [EMAIL PROTECTED] wrote: > > > That doesn't explain what you mean. How does "if arg==True" test whether > > > "a list is a boolean"? > > > >>> type(sys.argv) > > > > >>> type(True) > > > > All right,

Using "subprocess" without lists. . .?

2007-05-13 Thread Michael Williams
Hi All, I've recently seen the "subprocess" module and am rather confused by it's requirements. Is it not possible to execute an entire string without having to break them up into a list of arguments? For instance, I'd much rather do the following: subprocess.call("ls -al | grep -i test"

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread André
On May 13, 12:44 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In

Re: elementtree and entities

2007-05-13 Thread Duncan Booth
"Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > Hi list, > > How does one prevent elementtree converting & to & (and similarly > for other entities)? > from xml.etree import ElementTree as et x = et.Element( 'test' ) x.text = '&' et.tostring( x ) > '&' > > Sometimes I would li

Re: need help with python

2007-05-13 Thread Paul McGuire
On May 13, 10:10 am, [EMAIL PROTECTED] wrote: > On May 12, 11:55 am, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > > > > > > > I'm not sure how you installed Python, or how you are using it, but I > > made something last year to help Windows XP users who are brand new to > > Python and can't get t

Re: __dict__ for instances?

2007-05-13 Thread half . italian
On May 13, 4:30 am, Ivan Voras <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I think you want "dir(instance)" __dict__ returns the instance > > Part of the problem is that dir(instance) returns a list of strings, so > iterating the dir(instance) gets me strings, not methods. Alternativ

Re: package rating system for the Cheese Shop

2007-05-13 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > On May 12, 2:49 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> Is there a package rating system for the Cheese Shop, like how Perl >>> has cpanratings (http://cpanratings.perl.org/)? >> I don't know CPAN, but maybe this is what you're lookin

Re: elementtree and entities

2007-05-13 Thread Daniel Nogradi
> > How does one prevent elementtree converting & to & (and similarly > > for other entities)? > > > from xml.etree import ElementTree as et > x = et.Element( 'test' ) > x.text = '&' > et.tostring( x ) > > '&' > > > > Sometimes I would like to have the output '&' > > > > element

Re: Using "subprocess" without lists. . .?

2007-05-13 Thread Steven Bethard
Michael Williams wrote: > Hi All, > > I've recently seen the "subprocess" module and am rather confused by > it's requirements. Is it not possible to execute an entire string > without having to break them up into a list of arguments? For instance, > I'd much rather do the following: > > >

Re: __dict__ for instances?

2007-05-13 Thread Ivan Voras
Marc Christiansen wrote: > Nope, at least for PyGTK 2 :) See below. Aaah, but! > [...] >> This looks like it should be easy, but I can't find the solution :( > > Use the doc, Luke, oops, Ivan :) > Citing the gtk.glade.XML.signal_autoconnect documentation: > def signal_autoconnect(dict) >

Re: __dict__ for instances?

2007-05-13 Thread Ivan Voras
Bruno Desthuilliers wrote: > You're not doing anything wrong, that's just how Python works. "methods" > are wrapper objects around function objects attributes. The wrapping > only happens at lookup time, and returns different kind of "method" > wrapper (resp. unbound or bound methods) if the attri

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread John Nagle
Martin v. Löwis wrote: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In summary, this PEP proposes to allow non-A

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > So, please provide feedback, e.g. perhaps by answering these > questions: > - should non-ASCII identifiers be supported? why? No, and especially no without mandatory declarations of all variables. Look at the problems of non-ascii characters in domai

Re: Using "subprocess" without lists. . .?

2007-05-13 Thread Peter Otten
Michael Williams wrote: > I've recently seen the "subprocess" module and am rather confused by > it's requirements. Is it not possible to execute an entire string > without having to break them up into a list of arguments? For > instance, I'd much rather do the following: > > > subprocess.call

Re: Using "subprocess" without lists. . .?

2007-05-13 Thread Peter Otten
Steven Bethard wrote: > You could always call "ls -al | grep -i test".split(). Or better, shlex.split(). Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread André
On May 13, 2:30 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Martin v. Löwis wrote: > > PEP 1 specifies that PEP authors need to collect feedback from the > > community. As the author of PEP 3131, I'd like to encourage comments > > to the PEP included below, either here (comp.lang.python), or to > >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > This is a commonly-raised objection, but I don't understand why people > see it as a problem. The phishing issue surely won't apply, as you > normally don't "click" on identifiers, but rather type them. In a > phishing case, it is normally difficult t

GUI tutorial

2007-05-13 Thread John K Masters
Can someone point me in the direction of a good tutorial on programming python with a GUI? I'm just starting out with python and have written a few scripts successfully but would like to add a graphical front end to them to make it easier for my work colleagues, most of whom have never used a comma

Re: need help with python

2007-05-13 Thread BartlebyScrivener
On May 13, 10:10 am, [EMAIL PROTECTED] wrote: > > That is one of my problems, I don't know exactly how the whole command > line thing works. That's why I pointed you to the link. The ActiveState distribution will automatically add the correct paths to your environment and tell Windows that .py fil

Re: Using "subprocess" without lists. . .?

2007-05-13 Thread Steven Howe
Michael Williams wrote: Hi All, I've recently seen the "subprocess" module and am rather confused by it's requirements. Is it not possible to execute an entire string without having to break them up into a list of arguments? For instance, I'd much rather do the following: subprocess.c

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread André
On May 13, 12:44 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > It

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Anton Vredegoor
Martin v. Löwis wrote: > In summary, this PEP proposes to allow non-ASCII letters as > identifiers in Python. If the PEP is accepted, the following > identifiers would also become valid as class, function, or > variable names: Löffelstiel, changé, ошибка, or 売り場 > (hoping that the latter one means

Re: GUI tutorial

2007-05-13 Thread Paul Rubin
John K Masters <[EMAIL PROTECTED]> writes: > Can someone point me in the direction of a good tutorial on programming > python with a GUI? I'm just starting out with python and have written a > few scripts successfully but would like to add a graphical front end to > them to make it easier for my wo

Re: GUI tutorial

2007-05-13 Thread vasudevram
On May 13, 10:51 pm, John K Masters <[EMAIL PROTECTED]> wrote: > Can someone point me in the direction of a good tutorial on programming > python with a GUI? I'm just starting out with python and have written a > few scripts successfully but would like to add a graphical front end to > them to make

Re: Off Topic: Is the use of supererogatory supererogatory?

2007-05-13 Thread Alex Martelli
Paddy <[EMAIL PROTECTED]> wrote: > On May 13, 12:13 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > > > As somebody else alredy pointed out, the lambda is supererogatory (to > > say the least). > > What a wonderful new word! > I did not know what supererogatory meant, and hoped it had nothing to

Re: Dynamic subclassing ?

2007-05-13 Thread Alex Martelli
manatlan <[EMAIL PROTECTED]> wrote: ... > > def addaclass(aninst, onemoreclass): > > aninst.__class__ = type(aninst.__aclass__.__name__, > > (aninst.__aclass__, onemoreclass), {}) ... > b=gtk.Button("the_label") > addaclass(b,MoreMethods) ... > "TypeError: __class__ assignm

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Stefan Behnel
Anton Vredegoor wrote: >> In summary, this PEP proposes to allow non-ASCII letters as >> identifiers in Python. If the PEP is accepted, the following >> identifiers would also become valid as class, function, or >> variable names: Löffelstiel, changé, ошибка, or 売り場 >> (hoping that the latter one m

Re: Interesting list Validity (True/False)

2007-05-13 Thread Carsten Haese
On Sun, 2007-05-13 at 09:26 -0700, [EMAIL PROTECTED] wrote: > > The statement I made is simply the meaning of "if arg==True" by > > definition, so I don't see how it can be nonsensical. > > Because you didn't allow for exceptions, which are > prominently pointed out in the Python docs. I said: "i

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Jarek Zgoda
Martin v. Löwis napisał(a): > So, please provide feedback, e.g. perhaps by answering these > questions: > - should non-ASCII identifiers be supported? why? No, because "programs must be written for people to read, and only incidentally for machines to execute". Using anything other than "lowest c

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Stefan Behnel
Martin v. Löwis schrieb: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In summary, this PEP proposes to allow non

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Stefan Behnel
Paul Rubin wrote: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> - would you use them if it was possible to do so? in what cases? > > I would never insert them into a program. In existing programs where > they were used, I would remove them everywhere I could. Luckily, you will never be able

Re: Basic question

2007-05-13 Thread Cesar G. Miguel
On May 12, 8:13 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > Cesar G. Miguel <[EMAIL PROTECTED]> wrote: > > > On May 12, 3:40 pm, Dmitry Dzhus <[EMAIL PROTECTED]> wrote: > > > > Actually I'm trying to convert a string to a list of float numbers: > > > > str = '53,20,4,2' to L = [53.0, 20.0, 4.0,

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Stefan Behnel
Jarek Zgoda schrieb: > Martin v. Löwis napisał(a): Uuups, is that a non-ASCII character in there? Why don't you keep them out of an English speaking newsgroup? >> So, please provide feedback, e.g. perhaps by answering these >> questions: >> - should non-ASCII identifiers be supported? why? > >

Re: Simulating simple electric circuits

2007-05-13 Thread Bjoern Schliessmann
Arnaud Delobelle wrote: > I'm interested! I was tempted to have a go at it after your > initial post, it sounded like a nice little project :) Please stand by a day. I'm momentarily facing problems with currents that never end (going in a circle). And my code doesn't look that beatiful and/or clea

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Josiah Carlson
Stefan Behnel wrote: > Anton Vredegoor wrote: >>> In summary, this PEP proposes to allow non-ASCII letters as >>> identifiers in Python. If the PEP is accepted, the following >>> identifiers would also become valid as class, function, or >>> variable names: Löffelstiel, changé, ошибка, or 売り場 >>> (

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Michael Torrie
On Sun, 2007-05-13 at 21:01 +0200, Stefan Behnel wrote: > For example, I could write > > def zieheDreiAbVon(wert): > return zieheAb(wert, 3) > > and most people on earth would not have a clue what this is good for. However, > someone who is fluent enough in German could guess from the na

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Jarek Zgoda
Stefan Behnel napisał(a): >> While I can read the code with Hebrew, Russian or Greek names >> transliterated to ASCII, I would not be able to read such code in native. > > Then maybe it was code that was not meant to be read by you? OK, then. As a code obfuscation measure this would fit perfectl

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Stefan Behnel
Josiah Carlson wrote: > It's also about being able to type names to use them in your own code > (generally very difficult if not impossible for many non-Latin > characters), or even be able to display them. And no number of > guidelines, suggestions, etc., against distributing libraries with > non

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Terry Reedy
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | For example, I could write | | def zieheDreiAbVon(wert): | return zieheAb(wert, 3) | | and most people on earth would not have a clue what this is good for. However, | someone who is fluent enough in German could

PyRun_String and related functions causing garbage when calling a parsed function from C.

2007-05-13 Thread joeedh
Hi I'm getting extremely odd behavior. First of all, why isn't PyEval_EvalCode documented anywhere? Anyway, I'm working on blender's python integration (it embeds python, as opposed to python embedding it). I have a function that executes a string buffer of python code, fetches a function from

Re: __dict__ for instances?

2007-05-13 Thread Bruno Desthuilliers
Ivan Voras a écrit : > Marc Christiansen wrote: > > >>Nope, at least for PyGTK 2 :) See below. > > > Aaah, but! > > >>[...] >> >>>This looks like it should be easy, but I can't find the solution :( >> >>Use the doc, Luke, oops, Ivan :) >>Citing the gtk.glade.XML.signal_autoconnect documen

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Bruno Desthuilliers
Martin v. Löwis a écrit : > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In summary, this PEP proposes to allow no

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Bruno Desthuilliers
Stefan Behnel a écrit : > Anton Vredegoor wrote: > >>>In summary, this PEP proposes to allow non-ASCII letters as >>>identifiers in Python. If the PEP is accepted, the following >>>identifiers would also become valid as class, function, or >>>variable names: Löffelstiel, changé, ошибка, or 売り場 >>>

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread MRAB
On May 13, 8:49 pm, Michael Torrie <[EMAIL PROTECTED]> wrote: > On Sun, 2007-05-13 at 21:01 +0200, Stefan Behnel wrote: > > For example, I could write > > > def zieheDreiAbVon(wert): > > return zieheAb(wert, 3) > > > and most people on earth would not have a clue what this is good for. > >

Re: file uploader

2007-05-13 Thread Sick Monkey
I never heard a response back concerning my previous question, so I decided to write my own function. If anyone has a simpler way of checking to see if a file already exists (prior to uploading to a server) and renaming it, please let me know. Here is the code that I am using (it runs exactly th

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Bruno Desthuilliers
Stefan Behnel a écrit : > Martin v. Löwis schrieb: > >>PEP 1 specifies that PEP authors need to collect feedback from the >>community. As the author of PEP 3131, I'd like to encourage comments >>to the PEP included below, either here (comp.lang.python), or to >>[EMAIL PROTECTED] >> >>In summary, t

Re: Towards faster Python implementations - theory

2007-05-13 Thread Robert Brown
sturlamolden <[EMAIL PROTECTED]> writes: > On May 10, 7:18 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > > CMUCL and SBCL depends on the dominance of the x86 architecture. CMUCL and SBCL run on a variety of architectures, including x86, 64-bit x86, PowerPC, Sparc, Alpha, and Mips. See http

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Virgil Dupras
On May 13, 11:44 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Alexander Schmolck
Jarek Zgoda <[EMAIL PROTECTED]> writes: > Martin v. Löwis napisał(a): > >> So, please provide feedback, e.g. perhaps by answering these >> questions: >> - should non-ASCII identifiers be supported? why? > > No, because "programs must be written for people to read, and only > incidentally for machi

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Anders J. Munch
Josiah Carlson wrote: > On the other hand, the introduction of some 60k+ valid unicode glyphs > into the set of characters that can be seen as a name in Python would > make any such attempts by anyone who is not a native speaker (and even > native speakers in the case of the more obscure Kanji g

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Alex Martelli
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > Disallowing this does *not* guarantee in any way that > > identifiers are understandable for English native speakers. > > I'm not an English native speaker. And there's more than a subtle > distinction between "not garantying" and "encouraging".

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Alan Franzoni
Il Sun, 13 May 2007 17:44:39 +0200, "Martin v. Löwis" ha scritto: [cut] I'm from Italy, and I can say that some thoughts by Martin v. Löwis are quite right. It's pretty easy to see code that uses "English" identifiers and comments, but they're not really english - many times, they're just "englis

Re: GUI tutorial

2007-05-13 Thread Ivan Voras
John K Masters wrote: > Can someone point me in the direction of a good tutorial on programming > python with a GUI? I'm just starting out with python and have written a > few scripts successfully but would like to add a graphical front end to > them to make it easier for my work colleagues, most o

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Alexander Schmolck
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In summary, this PEP

Re: __dict__ for instances?

2007-05-13 Thread Ivan Voras
Bruno Desthuilliers wrote: >> "WARNING: "on_button_clicked" not callable or a tuple" > > Please post the relevant code and the full traceback. The code: Class W: def __init__(self): self.xml = gtk.glade.XML("glade/mainwin.glade") self.window = self.xml.get_widget("mainwin") self

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Anders J. Munch
Michael Torrie wrote: > > So given that people can already transliterate their language for use as > identifiers, I think avoiding non-ASCII character sets is a good idea. Transliteration makes people choose bad variable names, I see it all the time with Danish programmers. Say e.g. the most de

How to do basic CRUD apps with Python

2007-05-13 Thread walterbyrd
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax and non-Ajax solutions abound. With Python, finding such library, or apps. seems to be much more difficult to find. I thought django might be a good way, but I can not seem to get an answer on that board. I would like to put t

Re: Using "subprocess" without lists. . .?

2007-05-13 Thread Michael Williams
I'm not sure you replied entirely to the correct post. Basically I'm interested in encoding video with FFMPEG, but there will be variable length commands so I'd rather be able to type a single string for the "command" as opposed to having to enter it in the form of a list. And there is

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Steven D'Aprano
On Sun, 13 May 2007 15:35:15 -0700, Alex Martelli wrote: > Homoglyphic characters _introduced by accident_ should not be discounted > as a risk ... > But when something similar > happens to somebody using a sufficiently fancy text editor to input > source in a programming language allowing arbitra

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Anders J. Munch
Alex Martelli wrote: > > Homoglyphic characters _introduced by accident_ should not be discounted > as a risk, as, it seems to me, was done early in this thread after the > issue had been mentioned. In the past, it has happened to me to > erroneously introduce such homoglyphs in a document I was

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Paul Rubin
Alexander Schmolck <[EMAIL PROTECTED]> writes: > Plenty of programming languages already support unicode identifiers, Could you name a few? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Steven D'Aprano
On Sun, 13 May 2007 10:52:12 -0700, Paul Rubin wrote: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> This is a commonly-raised objection, but I don't understand why people >> see it as a problem. The phishing issue surely won't apply, as you >> normally don't "click" on identifiers, but rather

Re: file uploader

2007-05-13 Thread Gabriel Genellina
En Sun, 13 May 2007 18:41:16 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > If anyone has a simpler way of checking to see if > a file already exists (prior to uploading to a server) and renaming it, > please let me know. I will ignore the "server" part... > Here is the code that I am usin

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Michael Torrie wrote: > I think non-ASCII characters makes the problem far far worse. While I > may not understand what the function is by it's name in your example, > allowing non-ASCII characters makes it works by forcing all would-be > code readers have to have all kind

Re: GUI tutorial

2007-05-13 Thread Peter Decker
On 5/13/07, John K Masters <[EMAIL PROTECTED]> wrote: > Can someone point me in the direction of a good tutorial on programming > python with a GUI? I'm just starting out with python and have written a > few scripts successfully but would like to add a graphical front end to > them to make it easie

Re: Finally started on python..

2007-05-13 Thread Gabriel Genellina
En Sat, 12 May 2007 14:09:06 -0300, Roger Gammans <[EMAIL PROTECTED]> escribió: > Having known about python since around the turn of the century , > I finally found a (actually two) reason to learn it. Welcome! > Does the python communitity have something like Perl's CPAN and > is there alread

Re: docs patch: dicts and sets

2007-05-13 Thread rurpy
On May 11, 7:41 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > On May 11, 5:59 pm, "Alan Isaac" <[EMAIL PROTECTED]> wrote: > > > This is an attempt to synthesize Bill and Carsten's proposals. > > (I'm changing the subject line to better match the topic.) > > >http://docs.python.org/lib/typesmap

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Aldo Cortesi
Thus spake "Martin v. Löwis" ([EMAIL PROTECTED]): > - should non-ASCII identifiers be supported? why? No! I believe that: - The security implications have not been sufficiently explored. I don't want to be in a situation where I need to mechanically "clean" code (say, from a subm

Re: Finally started on python..

2007-05-13 Thread John Machin
On May 13, 3:09 am, Roger Gammans <[EMAIL PROTECTED]> wrote: > 2) > I've ended up coding a new wrapper for reading in data structures > from XML files (it wraps xml.sax) so that ctor are call on each end > tag with the XML Objects contents. > > is there already something there taht does this Chec

Re: design question

2007-05-13 Thread Gabriel Genellina
En Sun, 13 May 2007 11:40:16 -0300, Bruno Desthuilliers <[EMAIL PROTECTED]> escribió: > It's alas pretty common to see OO taught by persons who'd rather do some > other job - preferably not related to computers. If I had to name my worst class at university, it was the first one about OO. The

Weekly Python Patch/Bug Summary

2007-05-13 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 362 open ( +2) / 3766 closed ( +6) / 4128 total ( +8) Bugs: 968 open ( -3) / 6692 closed ( +9) / 7660 total ( +6) RFE : 256 open ( -1) / 286 closed ( +4) / 542 total ( +3) New / Reopened Patches __ Fix off-b

  1   2   >