[ANN] PyYAML-3.05: YAML parser and emitter for Python

2007-05-13 Thread Kirill Simonov
Announcing PyYAML-3.05 A new bug fix release of PyYAML is now available: http://pyyaml.org/wiki/PyYAML Changes === * Windows binary packages were built with LibYAML trunk. * Fixed a bug that prevent processing a live stream of YAML

Re: keyword checker - keyword.kwlist

2007-05-13 Thread tom
[EMAIL PROTECTED] kirjoitti: Gabriel Genellina kirjoitti: En Thu, 10 May 2007 17:03:13 -0300, [EMAIL PROTECTED] escribió: my_input = raw_input(...).strip() as Peter Otten suggested before --Gabriel Genellina Ok, it seems to work with strip(). Thanks for your help. Do you guys have any

Setting thread priorities

2007-05-13 Thread John Nagle
There's no way to set thread priorities within Python, is there? We have some threads that go compute-bound, and would like to reduce their priority slightly so the other operations, like accessing the database and servicing queries, aren't slowed as much. John

Re: Creating a function to make checkbutton with information from a list?

2007-05-13 Thread Peter Otten
Thomas Jansson wrote: Dear all I am writing a program with tkinter where I have to create a lot of checkbuttons. They should have the same format but should have different names. My intention is to run the functions and the create all the buttons with the names from the list. I now the

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

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 like to do it

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 Button: :

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 dir/cpan.txt

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 with inheritance, a

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 more elegant

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 sure

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

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

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 the

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 app.

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 a bound

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 like:

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() methods. You don't even need

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. quote if arg==True tests whether the object known as arg is equal to the object known as True. /quote Not at all, it makes perfect sense. X == Y always tests whether the

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 for intellectual

Re: design question

2007-05-13 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : On May 12, 9:34 pm, Bjoern Schliessmann usenet- [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 assignment for my

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 'list' type(True) type 'bool' All right, so what you meant was Assuming that arg is a list, 'if arg==True' will

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_setschedparam()

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 dictionary

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 somewhere

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

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, leading

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

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 happened.

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

elementtree and entities

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

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 'list' type(True) type 'bool' All right, so

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 summary,

Re: elementtree and entities

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

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 things to run,

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. Alternatively, is

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 looking for:

Re: elementtree and entities

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

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) 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 attribute is

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-ASCII

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 domain

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(ls -al

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 [EMAIL

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 to type

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

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 files

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:

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 should

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 work

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 it

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 do with

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__ assignment: only for

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 means

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: if

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 common

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

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 to touch

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, 2.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? No,

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 clean

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 売り場 (hoping that the

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 names

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 perfectly.

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

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 documentation: def

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

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 売り場 (hoping that the

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. However,

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

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, this PEP

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

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 summary,

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 machines to

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

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. I agree

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

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 of

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 proposes

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)

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

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

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 arbitrary

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 type them.

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 using (it

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 kinds of

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 easier for

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 already

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.)

  1   2   >