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

2007-05-13 Thread Gabriel Genellina
En Sun, 13 May 2007 17:58:17 -0300, <[EMAIL PROTECTED]> escribió: > 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 fu

Re: Removing part of string

2007-05-13 Thread Michael Bentley
On May 14, 2007, at 12:56 AM, [EMAIL PROTECTED] wrote: > Hi, > I am parsing an xml file ,and one part of structure looks > something like this: > > - PhysicalLink="Infotainment_Control_Bus_CAN"> > Infotainment_Control_Bus_CAN_TIMEOUT_AX > Timeout N_As/N_Ar > Time from transmit request

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Alex Martelli
Aldo Cortesi <[EMAIL PROTECTED]> wrote: > Thus spake Steven D'Aprano ([EMAIL PROTECTED]): > > > If you're relying on cursory visual inspection to recognize harmful code, > > you're already vulnerable to trojans. > > What a daft thing to say. How do YOU recognize harmful code in a patch > submiss

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > automated -- if the patch uses an unexpected "#-*- coding: blah" line, or No need -- a separate PEP (also by Martin) makes UTF-8 the default encoding, and UTF-8 can encode any Unicode character you like. Alex -- http://mail.python.org/mailman/listin

Removing part of string

2007-05-13 Thread saif . shakeel
Hi, I am parsing an xml file ,and one part of structure looks something like this: - Infotainment_Control_Bus_CAN_TIMEOUT_AX Timeout N_As/N_Ar Time from transmit request until a CAN frame transmit confirmation is received. In my code i am extracting the data within

Re: Asyncore Help?

2007-05-13 Thread Erik Max Francis
Paul Kozik wrote: > While basic socket work was rather easy to deal with, this has proved > significantly more difficult. Are there any good free sources for > information on Asyncore, and dealing with TCP? You haven't said specifically what you're having a problem with. The more general name f

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Martin v. Löwis
> It should be noted that the Python community may use other forums, in > other languages. They would likely be a lot more enthusiastic about > this PEP than the usual crowd here (comp.lang.python). Please spread the news. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Setting thread priorities

2007-05-13 Thread Nick Vatamaniuc
On May 13, 2:46 am, John Nagle <[EMAIL PROTECTED]> wrote: >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 queri

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Aldo Cortesi
Thus spake Steven D'Aprano ([EMAIL PROTECTED]): > If you're relying on cursory visual inspection to recognize harmful code, > you're already vulnerable to trojans. What a daft thing to say. How do YOU recognize harmful code in a patch submission? Perhaps you blindly apply patches, and then run y

Re: Basic question

2007-05-13 Thread Alex Martelli
Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Sat, 12 May 2007 20:13:48 -0300, Alex Martelli <[EMAIL PROTECTED]> > escribió: > > > Cesar G. Miguel <[EMAIL PROTECTED]> wrote: > >> --- > >> L = [] > >> file = ['5,1378,1,9', '2,1,4,5'] > >> str='' > >> for item in file: > >>

Asyncore Help?

2007-05-13 Thread Paul Kozik
I am working on the networking code for a small Multiplayer RPG I'm working on. I currently have some basic code using threads, but it seems like asyncore would be far better suited for my needs. However, I have trouble finding a solid example for what I need. Python.org and other sites provide sim

Re: BeautifulSoup vs. real-world HTML comments - possible fix

2007-05-13 Thread John Nagle
John Nagle wrote: > Note what happens when a bad declaration is found. > SGMLParser.parse_declaration > raises SGMLParseError, and the exception handler just sucks up the rest > of the > input (note that "rawdata[i:]"), treats it as unparsed data, and advances > the position to the end of input

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread John Nagle
Paul Rubin wrote: > Neil Hodgson <[EMAIL PROTECTED]> writes: > Plenty of programming languages already support unicode identifiers, >>> >>>Could you name a few? Thanks. >> >>C#, Java, Ecmascript, Visual Basic. > > > Java (and C#?) have mandatory declarations so homoglyphic identifiers a

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > password_is_correct is all ASCII. How do you know that? What steps did you take to ascertain it? Those are steps you currently don't have to bother with. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to do basic CRUD apps with Python

2007-05-13 Thread Michael Bentley
On May 13, 2007, at 6:20 PM, walterbyrd wrote: > 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 no

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Steven D'Aprano
On Sun, 13 May 2007 20:12:23 -0700, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> If I'm mistaken, please explain why I'm mistaken, not just repeat your >> claim in different words. > > if user_entered_password != stored_password_from_database: > password_is_correct

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > If I'm mistaken, please explain why I'm mistaken, not just repeat your > claim in different words. if user_entered_password != stored_password_from_database: password_is_correct = False ... if password_is_correct: log_user_in()

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Paul Rubin
Neil Hodgson <[EMAIL PROTECTED]> writes: > >> Plenty of programming languages already support unicode identifiers, > > Could you name a few? Thanks. > C#, Java, Ecmascript, Visual Basic. Java (and C#?) have mandatory declarations so homoglyphic identifiers aren't nearly as bad a problem. Ecm

Re: BeautifulSoup vs. real-world HTML comments - possible fix

2007-05-13 Thread John Nagle
Robert Kern wrote: > Carl Banks wrote: > >>On Apr 4, 4:55 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >> >>>Carl Banks wrote: >>> On Apr 4, 2:43 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >Carl Banks wrote: > >>On Apr 4, 2:08 pm, John Nagle <[EMAIL PROTECTED]> wrote: >> >>>

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Steven D'Aprano
On Sun, 13 May 2007 17:59:23 -0700, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > It certainly does apply, if you're maintaining a program and someone >> > submits a patch. In that case you neither click nor type the >> > character. You'd normally just make sure the patche

Re: Interesting list Validity (True/False)

2007-05-13 Thread [EMAIL PROTECTED]
On May 13, 2:09?pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Sun, 2007-05-13 at 09:26 -0700, [EMAIL PROTECTED] wrote: > There are no exceptions. "...and when I say none, I mean there is a certain amount." -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Steven D'Aprano
On Mon, 14 May 2007 09:42:13 +1000, Aldo Cortesi wrote: > I don't > want to be in a situation where I need to mechanically "clean" > code (say, from a submitted patch) with a tool because I can't > reliably verify it by eye. But you can't reliably verify by eye. That's ord

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Neil Hodgson
Paul Rubin wrote: >> Plenty of programming languages already support unicode identifiers, > > Could you name a few? Thanks. C#, Java, Ecmascript, Visual Basic. Neil -- http://mail.python.org/mailman/listinfo/python-list

[ANNOUNCE] Thirty-sixth release of PythonCAD now available

2007-05-13 Thread Art Haas
Hi. I'm pleased to announce the thirty-sixth development release of PythonCAD, a CAD package for open-source software users. As the name implies, PythonCAD is written entirely in Python. The goal of this project is to create a fully scriptable drafting program that will match and eventually exceed

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Terry Reedy
"Alan Franzoni" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Il Sun, 13 May 2007 17:44:39 +0200, "Martin v. Löwis" ha scritto: |Also, there should be a way to convert source files in any 'exotic' encoding to a pseudo-intellegibile encoding for any reader, a kind of translittering (

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > It certainly does apply, if you're maintaining a program and someone > > submits a patch. In that case you neither click nor type the > > character. You'd normally just make sure the patched program passes > > the existing test suite, and examine th

Re: GUI tutorial

2007-05-13 Thread BartlebyScrivener
On May 13, 12: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? Alan Gauld added a gui programming tutorial to his main course. http://www.freenetpages.co.uk/hp/alan.gauld/ It's a frame page so I can't

Re: append

2007-05-13 Thread Colin J. Williams
Sick Monkey wrote: > http://docs.python.org/tut/node7.html > > Yes there is a pop function. > > "An example that uses most of the list methods: > a = [66.25, 333, 333, 1, 1234.5] print a.count(333), a.count(66.25), a.count('x') > 2 1 0 a.insert(2, -1) a.append(333) a >

Re: Basic question

2007-05-13 Thread Gabriel Genellina
En Sat, 12 May 2007 20:13:48 -0300, Alex Martelli <[EMAIL PROTECTED]> escribió: > Cesar G. Miguel <[EMAIL PROTECTED]> wrote: >> --- >> L = [] >> file = ['5,1378,1,9', '2,1,4,5'] >> str='' >> for item in file: >> L.append([float(n) for n in item.split(',')]) > > The assignment

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

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

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

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

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

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

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

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

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

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

  1   2   >