Re: Best way to delimit a list?

2008-05-14 Thread castironpi
On May 13, 11:25 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Tue, 13 May 2008 04:14:16 -0700 (PDT), [EMAIL PROTECTED] declaimed the following in comp.lang.python: So f is a list, rather than a file object, of which os.open would have returned (my initial typo redirected the missive of

Re: Python and Flaming Thunder

2008-05-14 Thread castironpi
On May 14, 5:53 am, J. Clifford Dyer [EMAIL PROTECTED] wrote: On Tue, 2008-05-13 at 10:33 -0700, Dave Parker wrote: You sound like a commercial. Get Flaming Thunder for only $19.95!  It slices, it dices! And while programs and libraries written in assembly may be twice as fast as

pretty generic question

2008-05-14 Thread castironpi
I have to talk about coding. I'm thinking about traffic, freight, scheduling, microcontrols, and acoustics. I have pretty basics understandings of the controls of computers. My knowledge is a little contrary or rare; I specialize in information interfaces, but they're not very expensive to

Re: PPyGui emulator

2008-05-14 Thread castironpi
On May 14, 7:54 am, [EMAIL PROTECTED] wrote: Stef, Looks great!! Malcolm Nice touch on the Spin / Slider / Progress. Wink. -- http://mail.python.org/mailman/listinfo/python-list

named tuple mutability

2008-05-14 Thread castironpi
I'm concerned over the future of Python. Should tuples be named? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is self.file = file for?

2008-05-14 Thread castironpi
On May 14, 2:26 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: afrobeard a écrit : (top-post corrected. Please, do not top-post). On May 14, 3:08 am, [EMAIL PROTECTED] wrote: Hello! I have trouble understanding something in this code snippet: class TextReader:    

Re: Usenet

2008-05-14 Thread castironpi
On May 14, 11:58 am, Terry Reedy [EMAIL PROTECTED] wrote: Duncan Booth [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I also recommend Gmane which provides a free news server for most mailing | lists: mailing lists are a lot more manageable when gatewayed into a news | server.

Re: Purpose of operator package

2008-05-14 Thread castironpi
On May 14, 11:58 am, Matthew Woodcraft [EMAIL PROTECTED] wrote: I V  [EMAIL PROTECTED] wrote: I hadn't heard of operator.truth before. Does it do anything different from bool(x) ? Not really. It was occasionally useful before the bool type existed; now it's just a leftover. -M- Now as

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 5:25 am, [EMAIL PROTECTED] wrote: On May 14, 4:32 am, [EMAIL PROTECTED] wrote: On May 13, 9:55 pm, alex23 [EMAIL PROTECTED] wrote: On May 14, 5:41 am, inhahe [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] wrote in message You must be new here. It is an AS

Re: Python and Flaming Thunder

2008-05-14 Thread castironpi
On May 14, 8:43 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: That's also a myth.  For example, if C is easy to maintain, why is Flaming Thunder the only single-asset 8-by-8 shotgun cross compiler in the world?  There should be lots of single-asset 8-by-8 shotgun cross compilers written in

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 12:51 pm, [EMAIL PROTECTED] wrote: On May 14, 5:25 am, [EMAIL PROTECTED] wrote: On May 14, 4:32 am, [EMAIL PROTECTED] wrote: On May 13, 9:55 pm, alex23 [EMAIL PROTECTED] wrote: On May 14, 5:41 am, inhahe [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED]

Re: named tuple mutability

2008-05-14 Thread castironpi
On May 14, 12:41 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:  Should tuples be named? Yes. Not clearly should. Sequences ought be. If you're on the right time for both, can't the library hold the B? -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 1:02 pm, [EMAIL PROTECTED] wrote: On May 14, 12:51 pm, [EMAIL PROTECTED] wrote: On May 14, 5:25 am, [EMAIL PROTECTED] wrote: On May 14, 4:32 am, [EMAIL PROTECTED] wrote: On May 13, 9:55 pm, alex23 [EMAIL PROTECTED] wrote: On May 14, 5:41 am, inhahe [EMAIL

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 1:06 pm, [EMAIL PROTECTED] wrote: On May 14, 1:02 pm, [EMAIL PROTECTED] wrote: On May 14, 12:51 pm, [EMAIL PROTECTED] wrote: On May 14, 5:25 am, [EMAIL PROTECTED] wrote: On May 14, 4:32 am, [EMAIL PROTECTED] wrote: On May 13, 9:55 pm, alex23 [EMAIL PROTECTED]

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 1:07 pm, [EMAIL PROTECTED] wrote: On May 14, 1:06 pm, [EMAIL PROTECTED] wrote: On May 14, 1:02 pm, [EMAIL PROTECTED] wrote: On May 14, 12:51 pm, [EMAIL PROTECTED] wrote: On May 14, 5:25 am, [EMAIL PROTECTED] wrote: On May 14, 4:32 am, [EMAIL PROTECTED] wrote:

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 1:09 pm, [EMAIL PROTECTED] wrote: On May 14, 1:07 pm, [EMAIL PROTECTED] wrote: On May 14, 1:06 pm, [EMAIL PROTECTED] wrote: On May 14, 1:02 pm, [EMAIL PROTECTED] wrote: On May 14, 12:51 pm, [EMAIL PROTECTED] wrote: On May 14, 5:25 am, [EMAIL PROTECTED] wrote:

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 1:16 pm, [EMAIL PROTECTED] wrote: On May 14, 1:09 pm, [EMAIL PROTECTED] wrote: On May 14, 1:07 pm, [EMAIL PROTECTED] wrote: On May 14, 1:06 pm, [EMAIL PROTECTED] wrote: On May 14, 1:02 pm, [EMAIL PROTECTED] wrote: On May 14, 12:51 pm, [EMAIL PROTECTED] wrote:

Re: named tuple mutability

2008-05-14 Thread castironpi
On May 14, 1:04 pm, [EMAIL PROTECTED] wrote: On May 14, 12:41 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:  Should tuples be named? Yes. Not clearly should.  Sequences ought be.  If you're on the right time for both, can't the library hold the B? On the web, you can. Both data types

Re: named tuple mutability

2008-05-14 Thread castironpi
On May 14, 5:01 pm, Ben Finney [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: On 14 mai, 18:20, [EMAIL PROTECTED] wrote: I'm concerned over the future of Python.  Should tuples be named? Obviously not, unless they should. Clearly they should, unless not. Ben

Re: Using file objects with elementtree

2008-05-14 Thread castironpi
On May 14, 3:09 pm, dj [EMAIL PROTECTED] wrote: Hello, Rather then holding my XML document in memory before writing it to disk, I want to create a file object that elementtree will write each element to has it is created. Does any one know how to do that ? Here is my code so, far: fd =

Re: named tuple mutability

2008-05-14 Thread castironpi
On May 14, 5:28 pm, [EMAIL PROTECTED] wrote: On May 14, 5:01 pm, Ben Finney [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: On 14 mai, 18:20, [EMAIL PROTECTED] wrote: I'm concerned over the future of Python.  Should tuples be named? Obviously not, unless they

Re: named tuple mutability

2008-05-14 Thread castironpi
On May 14, 12:41 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:  Should tuples be named? Yes. Good; they're named sequences. -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 1:22 pm, Dan Upton [EMAIL PROTECTED] wrote: On Tue, May 13, 2008 at 10:55 PM, alex23 [EMAIL PROTECTED] wrote: On May 14, 5:41 am, inhahe [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] wrote in message You must be new here. It is an AS (Artificial Stupidity) trolling

Re: named tuple mutability

2008-05-14 Thread castironpi
On May 14, 6:21 pm, [EMAIL PROTECTED] wrote: On May 14, 12:41 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:  Should tuples be named? Yes. Good; they're named sequences. Can anyone make sling-shots of words? What's the splatter? -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 6:28 pm, [EMAIL PROTECTED] wrote: On May 14, 1:22 pm, Dan Upton [EMAIL PROTECTED] wrote: On Tue, May 13, 2008 at 10:55 PM, alex23 [EMAIL PROTECTED] wrote: On May 14, 5:41 am, inhahe [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] wrote in message You must be new

Re: Using file objects with elementtree

2008-05-14 Thread castironpi
On May 14, 5:41 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: dj schrieb: Hello, Rather then holding my XML document in memory before writing it to disk, I want to create a file object that elementtree will write each element to has it is created. Does any one know how to do that ?

Re: I'm stuck in Python!

2008-05-14 Thread castironpi
On May 14, 1:06 pm, [EMAIL PROTECTED] wrote: On May 14, 1:02 pm, [EMAIL PROTECTED] wrote: On May 14, 12:51 pm, [EMAIL PROTECTED] wrote: On May 14, 5:25 am, [EMAIL PROTECTED] wrote: On May 14, 4:32 am, [EMAIL PROTECTED] wrote: On May 13, 9:55 pm, alex23 [EMAIL PROTECTED]

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
. Don't let yourself be irritated by castironpi - he's the virtual equivalent of a mumbling mad man in this group. Ignorance serves best as remedy - and getting a filter to work, as I did (so I only see his postings being quoted... a huge relief!) Diez I hate to ignore work. Who is the non-virtual

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 5:28 am, [EMAIL PROTECTED] wrote: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole lot returned). so far: f=os.open(./get_hostnames).readlines returns ['host1

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread castironpi
On May 13, 5:10 am, [EMAIL PROTECTED] wrote: We have to avoid the use of the 'is' identity operator with basic, immutable values such as numbers and strings. The result is unpredictable because of the way Python handles these objects internally. How is with this issue in Python 3.0? Is it

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
color might indicated evenly distributed pressure. Don't let yourself be irritated by castironpi - he's the virtual equivalent of a mumbling mad man in this group. Ignorance serves best as remedy - and I only see his postings being quoted... a huge relief!) Diez I hate to ignore

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 5:46 am, [EMAIL PROTECTED] wrote: On May 13, 11:28 am, [EMAIL PROTECTED] wrote: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole lot returned). so far:

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread castironpi
On May 13, 5:37 am, Christian Heimes [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: We have to avoid the use of the 'is' identity operator with basic, immutable values such as numbers and strings. The result is unpredictable because of the way Python handles these objects

Re: feedparser

2008-05-13 Thread castironpi
On May 13, 6:06 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 13 May 2008 07:30:44 -0300, Mike [EMAIL PROTECTED] escribió: I'm trying to use the feedparser module (http://www.feedparser.org/). Is it possible to use this without running the setup program? I don't see why not,

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 6:18 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 13 May 2008 07:46:45 -0300, [EMAIL PROTECTED] escribió: On May 13, 11:28 am, [EMAIL PROTECTED] wrote: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 6:18 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 13 May 2008 07:46:45 -0300, [EMAIL PROTECTED] escribió: On May 13, 11:28 am, [EMAIL PROTECTED] wrote: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was

Re: Backslash frowned upon?

2008-05-13 Thread castironpi
On May 13, 5:54 am, Paul Melis [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Why is the  \  backslash character frowned upon? Can I still use it in Python 3.0 to achieve the same thing it was designed to do? Yes, it's still valid to use in a script.

Re: where to get McMillan Installer?

2008-05-13 Thread castironpi
On May 13, 5:47 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 13 May 2008 07:06:09 -0300, gsal [EMAIL PROTECTED] escribió: There does not seem to be a valid url for the Installer, anywhere. Could anyone provide me with a copy of it? I think py2exe is its

I'm stuck in Python!

2008-05-13 Thread castironpi
Hi all. I am trying to write to the Python newsgroup. I doubt (aha, but doubt) that I have come to the right place. (Incoming this!) Is this the Python newsgroup? I heard it was called comp.lang.python. Now to repeat the subject line. I'm stuck in Python. Now that was fun. I will also try

Re: threads problem in python

2008-05-13 Thread castironpi
On May 13, 5:38 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 13 May 2008 06:42:13 -0300, Astan Chee [EMAIL PROTECTED] escribió: I have 2 classes in python, the first one runs first and and then the   first one calls the second class. I want it to run the second class as a  

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 8:32 am, Dave Parker [EMAIL PROTECTED] wrote: Don't let yourself be irritated by castironpi I'm not the sort to get irritated by anyone.  There is value in all interaction.  Flaming Thunder is itself the averaging of interactions with many computer languages and conversations

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 8:17 am, Giuseppe Ottaviano [EMAIL PROTECTED] wrote: On May 13, 2008, at 12:28 PM, [EMAIL PROTECTED] wrote: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole

Re: I'm stuck in Python!

2008-05-13 Thread castironpi
On May 13, 8:46 am, Sanoski [EMAIL PROTECTED] wrote: Any programming that helps you solve a problem is fun and recreational. At least, that's how I look at it. I suppose it really depends on why you're doing it, what your objective is, etc. But I'd say, why not? Tron! That's one I haven't

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 8:32 am, Peter Otten [EMAIL PROTECTED] wrote: Giuseppe Ottaviano wrote: def ichain(seq): for s in seq: for x in s: yield x (which is often useful and I don't think it has been included in   itertools) you can iterate lazily on the file: Python 2.6

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 9:05 am, Dave Parker [EMAIL PROTECTED] wrote: On May 13, 7:44 am, [EMAIL PROTECTED] wrote: I am not convinced that the colorspace occupies three dimensions necessarily. Apparently there are some people -- called tetrachromats -- who can see color in four dimensions.  They have

Re: where to get McMillan Installer?

2008-05-13 Thread castironpi
On May 13, 8:23 am, gsal [EMAIL PROTECTED] wrote: hhhmmm...py2exe...I tried it earlier and it couldn't handle some of the packages I was using because they were in the egg form.  I was hoping Installer could...then again, I don't know how long ago Installer was written and whether eggs came

Re: I'm stuck in Python!

2008-05-13 Thread castironpi
On May 13, 9:01 am, [EMAIL PROTECTED] wrote: On May 13, 8:46 am, Sanoski [EMAIL PROTECTED] wrote: Any programming that helps you solve a problem is fun and recreational. At least, that's how I look at it. I suppose it really depends on why you're doing it, what your objective is, etc.

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 9:08 am, [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Peter Otten [EMAIL PROTECTED] wrote: Giuseppe Ottaviano wrote: def ichain(seq): for s in seq: for x in s: yield x (which is often useful and I don't think it has been included in  

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 9:31 am, [EMAIL PROTECTED] wrote: On May 13, 9:08 am, [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Peter Otten [EMAIL PROTECTED] wrote: Giuseppe Ottaviano wrote: def ichain(seq): for s in seq: for x in s: yield x (which is often

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 9:34 am, hdante [EMAIL PROTECTED] wrote: On May 13, 10:58 am, Paul McGuire [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Dave Parker [EMAIL PROTECTED] wrote: Don't let yourself be irritated by castironpi I'm not the sort to get irritated by anyone.  There is value in all

Re: I'm stuck in Python!

2008-05-13 Thread castironpi
Just catch throw, stuff, and information. I think it's fine. I have an hour to write some code. Who wants parity stuff? On May 13, 8:46 am, Sanoski [EMAIL PROTECTED] wrote: Any programming that helps you solve a problem is fun and recreational. At least, that's how I look at it. I suppose it

Re: I'm stuck in Python!

2008-05-13 Thread castironpi
On May 13, 10:08 am, [EMAIL PROTECTED] wrote: Just catch throw, stuff, and information.  I think it's fine.  I have an hour to write some code.  Who wants parity stuff? On May 13, 8:46 am, Sanoski [EMAIL PROTECTED] wrote: Any programming that helps you solve a problem is fun and

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
, hdante [EMAIL PROTECTED] wrote: On May 13, 10:58 am, Paul McGuire [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Dave Parker [EMAIL PROTECTED] wrote: Don't let yourself be irritated by castironpi I'm not the sort to get irritated by anyone.  There is value in all interaction

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 9:45 am, [EMAIL PROTECTED] wrote: On May 13, 9:34 am, hdante [EMAIL PROTECTED] wrote: On May 13, 10:58 am, Paul McGuire [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Dave Parker [EMAIL PROTECTED] wrote: Don't let yourself be irritated by castironpi I'm not the sort

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
, hdante [EMAIL PROTECTED] wrote: On May 13, 10:58 am, Paul McGuire [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Dave Parker [EMAIL PROTECTED] wrote: Don't let yourself be irritated by castironpi I'm not the sort to get irritated by anyone.  There is value in all interaction

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
, hdante [EMAIL PROTECTED] wrote: On May 13, 10:58 am, Paul McGuire [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Dave Parker [EMAIL PROTECTED] wrote: Don't let yourself be irritated by castironpi I'm not the sort to get irritated by anyone.  There is value in all interaction

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
. But the future is one of the hardest things to predict, so we'll see. On May 13, 8:34 am, hdante [EMAIL PROTECTED] wrote: On May 13, 10:58 am, Paul McGuire [EMAIL PROTECTED] wrote: On May 13, 8:32 am, Dave Parker [EMAIL PROTECTED] wrote: Don't let yourself be irritated by castironpi

Re: I'm stuck in Python!

2008-05-13 Thread castironpi
On May 13, 2:41 pm, inhahe [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On May 13, 9:46 am, Sanoski [EMAIL PROTECTED] wrote: Any programming that helps you solve a problem is fun and recreational. At least, that's how I look at it. I

Re: Socket and cycle problem

2008-05-12 Thread castironpi
On May 12, 2:06 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 12 May 2008 11:16:08 -0700 (PDT), [EMAIL PROTECTED] wrote: [snip] My script send me via 3883 port (VRPN) data, but only once. I need listening this port countinously. So I need  make some loop to print data from 3883

Re: Python and Flaming Thunder

2008-05-12 Thread castironpi
On May 12, 6:39 pm, Dave Parker [EMAIL PROTECTED] wrote: I've read that one of the design goals of Python was to create an easy- to-use English-like language.  That's also one of the design goals of Flaming Thunder athttp://www.flamingthunder.com/ , which has proven easy enough for even

Re: Python and Flaming Thunder

2008-05-12 Thread castironpi
On May 12, 7:59 pm, Dave Parker [EMAIL PROTECTED] wrote: On May 12, 6:32 pm, [EMAIL PROTECTED] wrote: Can you render some furniture for me... to try to see some human posture to lowest energy levels. I couldn't find any furniture created using DPGraph, but the math art gallery

Re: Learning Python for no reason

2008-05-12 Thread castironpi
Anyway, Chuck's post doesn't question any of the competencies of computer science. Is it safe to name-call silly, or have -I- by disdesign misinterpreted? On May 12, 6:41 pm, Chuckk Hubbard [EMAIL PROTECTED] wrote: I'm another one pretty early in his programming education, but here's my take.

Re: Python and Flaming Thunder

2008-05-12 Thread castironpi
On May 12, 8:18 pm, Dave Parker [EMAIL PROTECTED] wrote: On May 12, 7:12 pm, [EMAIL PROTECTED] wrote: Mine's been always messing up the color wheel. Messing up in what way?  Are you using the colors to visualize something? In a manner of speaking. I'm a first-time-live Information

Re: Python and Flaming Thunder

2008-05-12 Thread castironpi
On May 12, 8:36 pm, Dave Parker [EMAIL PROTECTED] wrote: On May 12, 7:20 pm, [EMAIL PROTECTED] wrote:  Yes, I am trying to visualize something. If it is related to making furniture comfortable for humans, have you considered painting the furniture with thermochromic paint

Re: Is using range() in for loops really Pythonic?

2008-05-11 Thread castironpi
On May 11, 12:38 am, Paul Rubin http://[EMAIL PROTECTED] wrote: John Salerno [EMAIL PROTECTED] writes: for x in range(10):     #do something 10 times is unPythonic. The reason I ask is because the structure of the for loop seems to be for iterating through a sequence. It seems somewhat

Re: what does int means for python ?

2008-05-11 Thread castironpi
On May 11, 5:05 am, alefajnie [EMAIL PROTECTED] wrote: try arr[2][3] instead. basically your version is trying to index an array with a tuple argument (2,3). --irmen oh, you're right. btw, is any simple way to create multi-dimension array ? any built-in function ? it is not clear

Re: diffing and uniqing directories

2008-05-11 Thread castironpi
On May 11, 2:44 pm, Dan Stromberg [EMAIL PROTECTED] wrote: On Sat, 26 Apr 2008 23:44:17 +0530, Rustom Mody wrote: Over years Ive collected tgz's of my directories. I would like to diff and uniq them Now I guess it would be quite simple to write a script that does a walk or find through a

Re: pickle problem

2008-05-11 Thread castironpi
On May 11, 6:21 pm, [EMAIL PROTECTED] wrote: On May 8, 7:29 pm, [EMAIL PROTECTED] wrote: On May 8, 4:35 pm, Hrvoje Niksic [EMAIL PROTECTED] wrote: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] writes: On Thu, 08 May 2008 08:55:35 -0700, krustymonkey wrote: The thing is, I'm not

Re: Python, are you ill?

2008-05-11 Thread castironpi
On May 11, 6:26 pm, Tim Roberts [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: If you are in the interactive prompt of the Python interpreter and you do this print Testing\   or   print '''Testing\''' you get three dots [...] as if Python expects a code block. ...which it does. If

Re: Pythonicity of some algorithms

2008-05-10 Thread castironpi
On May 10, 5:21 am, Martin v. Löwis [EMAIL PROTECTED] wrote: This works for me. But I'd like to know if this is considered Pythonic, and if there are other, better ways of doing the above in Python. From the Python point of view, it's fine. However, it uses busy-wait, which I consider bad

Re: slicing lists

2008-05-10 Thread castironpi
On May 9, 3:17 pm, [EMAIL PROTECTED] wrote: On May 9, 10:11 am, Yves Dorfsman [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: The only thing is, is there is another natural meaning to [a,b:c]. Counting grids on the diagonals, the rational set is well defined: 0: 0, 0 1: 1,

Re: People still using Tkinter?

2008-05-10 Thread castironpi
On May 10, 1:38 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Sat, 10 May 2008 00:20:33 -0500, Kenneth McDonald wrote: Any guesses as to how many people are still using Tkinter? And can   anyone direct me to good, current docs for Tkinter? AFAIK `Tkinter` hasn't changed much over

Now, as for the jokes: Python!

2008-05-10 Thread castironpi
Dear Monty, Grail This. The grail is unarmed and floating. Stop posting the newsgroup. Python is Monty Python. In the sense of identity ascription, of course. Trivially not, A Bartender. -- http://mail.python.org/mailman/listinfo/python-list

Re: Now what!?

2008-05-10 Thread castironpi
On May 10, 10:05 pm, hdante [EMAIL PROTECTED] wrote: On May 10, 8:22 pm, notbob [EMAIL PROTECTED] wrote: On 2008-05-10, Dennis Lee Bieber [EMAIL PROTECTED] wrote:    So... in short, you'd need to have been reading a tutorial specific to shell scripting... I have been.  I'm also

Re: People still using Tkinter?

2008-05-10 Thread castironpi
On May 10, 1:57 pm, Kenneth McDonald [EMAIL PROTECTED] wrote: The only trick it that sometimes it isn't obvious how to make the Tcl/ Tk call via Python. Ken On May 10, 2008, at 11:27 AM, Martin v. Löwis wrote: I am, but still isn't the word, I just started.  Good, *complete* docs seem

Re: slicing lists

2008-05-09 Thread castironpi
On May 9, 1:23 am, Ian Kelly [EMAIL PROTECTED] wrote: On Wed, May 7, 2008 at 5:29 PM, Yves Dorfsman [EMAIL PROTECTED] wrote: Is there a way to do: x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] x[0,2:6] That would return: [0, 3, 4, 5, 6] I am surprised this notation is not supported, it seems

bytes1.shuffle( )

2008-05-09 Thread castironpi
random.shuffle( bytes1 ) if random == bytes: repunctuate( sentence ) else: random.shuffle( [ random ] ) sincerely exit, () -- http://mail.python.org/mailman/listinfo/python-list

Re: How to modify meaning of builtin function not to !?

2008-05-09 Thread castironpi
On May 9, 8:41 am, grbgooglefan [EMAIL PROTECTED] wrote: I am creating functions, the return result of which I am using to make decisions in combined expressions. In some expressions, I would like to inverse the return result of function. E.g. function contains(source,search) will return

Re: slicing lists

2008-05-09 Thread castironpi
On May 9, 10:11 am, Yves Dorfsman [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: The only thing is, is there is another natural meaning to [a,b:c]. Counting grids on the diagonals, the rational set is well defined: 0: 0, 0 1: 1, 0 2: 0, 1 3: 2, 0 4: 1, 1 5: 0, 2 6: 3, 0

Re: RELEASED Python 2.6a3 and 3.0a5

2008-05-09 Thread castironpi
On May 9, 7:55 pm, Stéphane Larouche [EMAIL PROTECTED] wrote: On 9 Mai, 01:50, Barry Warsaw [EMAIL PROTECTED] wrote: On behalf of the Python development team and the Python community, I am happy to announce the third alpha release of Python 2.6, and the fifth alpha release of Python

Python and the Bartender

2008-05-09 Thread castironpi
Incidentally, now that everyone knows English, writer would like to critique his behavior. I have leaned to the group for approval, at times by disparaging the efforts of others, but other times not. I have expressed negative emotion. Is anyone in earshot getting work done that I am interfering

Re: Mathematics in Python are not correct

2008-05-08 Thread castironpi
On May 8, 6:10 pm, Nicolas Dandrimont [EMAIL PROTECTED] wrote: * [EMAIL PROTECTED] [EMAIL PROTECTED] [2008-05-08 15:54:42 -0700]: Have a look at this: -123**0 -1 The result is not correct, because every number (positive or negative) raised to the power of 0 is ALWAYS 1 (a positive

Re: threading - race condition?

2008-05-08 Thread castironpi
On May 8, 5:45 pm, skunkwerk [EMAIL PROTECTED] wrote: i'm getting the wrong output for the 'title' attributes for this data.  the queue holds a data structure (item name, position, and list to store results in).  each thread takes in an item name and queries a database for various attributes.  

Re: RELEASED Python 2.6a3 and 3.0a5

2008-05-08 Thread castironpi
On May 8, 6:50 pm, Barry Warsaw [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team and the Python community, I   am happy to announce the third alpha release of Python 2.6, and the   fifth alpha release of Python 3.0. Please note

Re: Python GUIs and custom controls

2008-05-08 Thread castironpi
On May 8, 4:30 pm, Chuckk Hubbard [EMAIL PROTECTED] wrote: I likewise don't know enough to compare between toolkits, but another one to check out might be pygame.  If nothing else, it is meant to be fast and to handle 3D views. -Chuckk On Fri, May 9, 2008 at 12:10 AM, Joe P. Cool [EMAIL

Re: Running a python code periodically

2008-05-08 Thread castironpi
On May 8, 3:31 pm, Terry Reedy [EMAIL PROTECTED] wrote: Maryam Saeedi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] |I was wondering if you know how can I run a python code once every five | minutes for a period of time either using python or some other program like | a bash

Re: Python Syntax and misspelled variable and method name checker?

2008-05-08 Thread castironpi
On May 8, 1:06 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: neerashish schrieb: Is there a good Python Syntax and mis-spelled variable and method name checker available. I have been programming in python for last 6 months and misspelled variables and method names have been bane of my

Re: observer pattern question #1 (reference to subject)

2008-05-08 Thread castironpi
On May 8, 4:57 pm, Alan Isaac [EMAIL PROTECTED] wrote: Ville M. Vainio wrote: in case of stocks, you are probably monitoring several stock objects, so the stock should probably pass itself to the observer OK.  This is related to my question #2 (in a separate thread), where I'd also

Re: pickle problem

2008-05-08 Thread castironpi
On May 8, 4:35 pm, Hrvoje Niksic [EMAIL PROTECTED] wrote: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] writes: On Thu, 08 May 2008 08:55:35 -0700, krustymonkey wrote: The thing is, I'm not using slots by choice.  I'm using the standard lib socket class, which apparently uses slots.

Re: saving a webpage's links to the hard disk

2008-05-07 Thread castironpi
On May 7, 1:40 am, Jetus [EMAIL PROTECTED] wrote: On May 4, 7:22 am, [EMAIL PROTECTED] wrote: On May 4, 12:33 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 04 May 2008 01:33:45 -0300, Jetus [EMAIL PROTECTED] escribió: Is there a good place to look to see where I can

Re: Why don't generators execute until first yield?

2008-05-07 Thread castironpi
On May 7, 7:37 am, Marco Mariani [EMAIL PROTECTED] wrote: Duncan Booth wrote: Perhaps if you'd copied all of my code (including the decorator that was the whole point of it)... Sure, I missed the point. Python's symbols become quoting levels and mess up messages. Anyway, I would loathe

Re: Generate labels for a multi-level outline

2008-05-07 Thread castironpi
''' On May 6, 4:43 pm, [EMAIL PROTECTED] honoring: a.next( ) ( I, ) a.throw( up ) ( I, A ) a.next( ) ( I, B ) a.next( ) ( I, C ) a.throw( down ) ( II, ) ''' #funny declaration class up( Exception ): pass class down( Exception ): pass def outline( ): stack= [ 1 ] while 1:

Re: letter frequency counter / your thoughts..

2008-05-07 Thread castironpi
On May 7, 12:30 pm, Paul Melis [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Here is my code for a letter frequency counter.  It seems bloated to me and any suggestions of what would be a better way (keep in my mind I'm a beginner) would be greatly appreciated.. Not bad for a beginner

Re: Generate labels for a multi-level outline

2008-05-07 Thread castironpi
On May 7, 9:07 am, [EMAIL PROTECTED] wrote: ''' On May 6, 4:43 pm, [EMAIL PROTECTED] honoring: a.next( ) ( I, ) a.throw( up ) ( I, A ) a.next( ) ( I, B ) a.next( ) ( I, C ) a.throw( down ) ( II, ) ''' #funny declaration class up( Exception ): pass class down( Exception ):

Re: letter frequency counter / your thoughts..

2008-05-07 Thread castironpi
On May 7, 1:31 pm, Ian Kelly [EMAIL PROTECTED] wrote: On Wed, May 7, 2008 at 11:30 AM, Paul Melis [EMAIL PROTECTED] wrote:     dic = {}     for letter in strng:         if letter not in dic:             dic[letter] = 0         dic[letter] += 1 As a further refinement, you could use

Re: howto print binary number

2008-05-07 Thread castironpi
On May 7, 3:31 pm, Mensanator [EMAIL PROTECTED] wrote: On May 7, 3:13 pm, dmitrey [EMAIL PROTECTED] wrote: hi all, could you inform how to print binary number? I.e. something like print '%b' % my_number it would be nice would it print exactly 8 binary digits (0-1, with possible

Re: howto print binary number

2008-05-07 Thread castironpi
On May 7, 4:03 pm, Joel Bender [EMAIL PROTECTED] wrote: Python 3.0 has such a formatting operation, but Python 2.x does not.   However it's not hard to write. Indeed.  Refraining from using named lambdas:       def bin(x):      ...     return ''.join(x (1 i) and '1' or '0' for i in    

Re: letter frequency counter / your thoughts..

2008-05-07 Thread castironpi
On May 7, 5:27 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 7 mai, 23:51, [EMAIL PROTECTED][EMAIL PROTECTED] wrote: (snip) Small improvement thanks to Paul Rubin: from collections import defaultdict from operator import itemgetter def get_letters_frequency(source):    

Re: slicing lists

2008-05-07 Thread castironpi
On May 7, 6:58 pm, Ivan Illarionov [EMAIL PROTECTED] wrote: On Wed, 07 May 2008 23:46:33 +, Ivan Illarionov wrote: On Wed, 07 May 2008 23:29:27 +, Yves Dorfsman wrote: Is there a way to do: x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] x[0,2:6] That would return: [0, 3, 4, 5, 6]

Re: Why don't generators execute until first yield?

2008-05-07 Thread castironpi
On May 7, 4:51 pm, Michael Torrie [EMAIL PROTECTED] wrote: Martin Sand Christensen wrote: Why don't generators follow the usual eager evaluation semantics of Python and immediately execute up until right before the first yield instead? A great example of why this behavior would defeat

<    1   2   3   4   5   6   7   8   9   10   >