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

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

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

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

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

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

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

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

<    1   2